> Another question... if I want to set a field blank for each field that
> had an error how would i do that?

I would do this in the model, after validations. I would use 'each' or
'valid?', depending on how you want to handle it.

If you clear the field in the model, after validations have run (and
you have your errors for display in the view), then your fields will
be already set for your view. I think that clearing the fields in the
controller or the view is a mistake as it's not their job to manage
the contents of the model values. I would only do this in the
controller if the default behavior is not to have the values cleared;
for example, if the values should be cleared in one part of your
application and not in another part of your application.

-- 
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.

Reply via email to