I’m trying to create a very simple “form_for” form which, when
submitted, will create, via a RESTFUL controller, a new model
object…all exactly as per the scaffold_resource-generated
model/controller/view but with one difference:
At the time the form is generated, I compute the appropriate value for 2
of this model’s 3 columns based on instance variables floating around at
that time (they depend on the view the user is being presented with)
The form presents the user with the remaining 1 attribute to fill in.
Upon submission, how do I get my 2 predetermined values to the
controller within the standard params[:model_name] hash? I don’t want to
set my 2 attributes within the controller, as I want the controller
“create” action to remain more generic than that.
I imagine this is trivial…if you know how!
Many thanks, Nathaniel