Class: UrlDataModelController

Inherits:
ApplicationController show all
Defined in:
app/controllers/url_data_model_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#hello

Instance Method Details

#createObject


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

#indexObject


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

#newObject


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

#showObject


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