Actually the non-model specific fields you have should be available in the params after the model redirects back to the view after some validation errors.
So say the param / name of the param for the non-model field is subject, it's value will be available with params[:subject] so you can feed this to the field. Same thing goes for other non-model fields. Thanks & Regards, Dhruva Sagar. On Wed, Dec 23, 2009 at 3:41 PM, nisha <[email protected]> wrote: > Hi all. > > I have a form with multiple models and there are certain input fields > that are not tied to any model. Now when this form is submitted and > when validation error occurs, the form shows up with the fields that > are not belonging to any model as blank. i.e it does not persist the > input values for those input fields. is there a way to persist input > values that are not tied to the model? > > To make the scenario clear, let me explain with an eg. Suppose a form > contains : > Project Id : hidden field for project model > User Name : tied to user model (child of project ) > User email :tield to user model > Subject : just a params[:subject] (i.e field not tied either to the > project or the user models) > Division : just a params[:division] (i.e field not tied to either of > the models) > > Now if i provide the input valus for the above and submit this form > and if there is any validation error, the form shows up with subject > and division as blank values even thought the values were supplied. So > essentially it is not persisting the values between two actions. can > anyone suggest how to retain those input values. > > Thanks in advance > Nisha > > -- > > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<rubyonrails-talk%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

