Please consider a CRUD action and view for modifying a record. The
form for making the modification is called by the URL, "http://
www.mydomain.com/members/modify/5". This calls the "modify" action of
the "members" controller and passes the :id parm of "5". The action
uses the :id param to retrieve the appropriate record which is passed
to the view in the @member instance variable. The view uses the data
provided in @member to pre-populate the form with the current values.
The user uses the form to make any desired modifications to the
current values and submits the form to another action which saves the
updated data and redirects the user to another URL.
Under normal circumstances the above works just fine. If, however,
the form is validated and there is a validation error; then, the
original form needs to be re-rendered with error messages. The
problem is that, as far as I can see, 'render' does not allow params
to be passed to the view; so, in this second rendering of the form,
the form doesn't have any data to pre-populate the fields.
My question is: How do I pass the parameters to the re-rendered
view? In fact, now that I think about it, how are parameters normally
passed to a rendered view. I would think that it would all be the
Thanks for any input.