Class: UrlDataModelController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- UrlDataModelController
- Defined in:
- app/controllers/url_data_model_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
—————————————————————————— Name: create.
-
#index ⇒ Object
—————————————————————————— Name: index.
-
#new ⇒ Object
—————————————————————————— Name: new.
-
#show ⇒ Object
—————————————————————————— Name: show.
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
Name: create
Purpose: To display at model.
Precondition: @model exists.
Postcondition: Model with the ID :id is accessible to the view.
-----
Calls:
Called By: printable_controller.rb
-----
Additional Comments:
Programmer: ND Guthrie Date: 20190305
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'app/controllers/url_data_model_controller.rb', line 131 def create modelParams = "http://docraptor.com/examples/invoice.htm" # modelParams = "http://www.sspro.com" @url_data_model = UrlDataModel.new(modelParams) # if @url_data_model.save # redirect_to @url_data_model # else # render 'new' # end render 'show' end |
#index ⇒ Object
Name: index
Purpose:
Precondition: url_data_models table exists.
Postcondition: Models extant in url_data_models table are displayed in the index.
-----
Calls:
Called By: printable_controller.rb
-----
Additional Comments:
Programmer: ND Guthrie Date: 20190305
30 31 32 33 34 |
# File 'app/controllers/url_data_model_controller.rb', line 30 def index @url_data_models = UrlDataModel.all end |
#new ⇒ Object
Name: new
Purpose:
Precondition:
Postcondition:
-----
Calls:
Called By: printable_controller.rb
-----
Additional Comments:
Programmer: ND Guthrie Date: 20190306
64 65 66 |
# File 'app/controllers/url_data_model_controller.rb', line 64 def new end |
#show ⇒ Object
Name: show
Purpose: To display a model.
Precondition: @model exists.
Postcondition: Model with the ID :id is accessible to the view.
-----
Calls:
Called By: printable_controller.rb
-----
Additional Comments:
Programmer: ND Guthrie Date: 20190305
96 97 98 99 100 |
# File 'app/controllers/url_data_model_controller.rb', line 96 def show @url_data_model = UrlDataModel.find(params[:id]) end |