After a POST, I want to be able to redisplay a view with the data that
was previously entered when my controller action notices a validation
failure and calls render on the view that does the submit.
View x.rhtml - text field is filled in
Call controller action
Controller action fails validation calls render (:action => ‘x’)
x.rthml shows up with blank text field which I would like to be filled
Why this doesn’t work makes sense to me (more or less) already.
My text_field is not associated with an attribute on a model object.
The object and field names are arbitrary since I was able to
successfully pull the data from the param array.
Do I need to associate my form field with a model object in order to
successfully redisplay data that was submitted on a previous POST?
Is there another way to handle this by using text_field_tag?
I am wondering whether I should build a model just to handle this form
interaction or whether I should use a text_field_tag instead.
I am starting to see that thinking of model as strictly objects that
require persistence to a database is limiting :). Any takers for that