One way to make this happen is to do a redirect in the controller after 
Model.save or Model.update_attributes rather than a render back to the new or 
edit action.  Could that be your problem?

(If that's not clear, post the update method of the appropriate controller.)

HTH,

-Roy

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of 
justinbankston
Sent: Thursday, October 09, 2008 11:25 AM
To: Ruby on Rails: Talk
Subject: [Rails] validates_presence_of and a blank form...


Hey All,

I'm frustrated with validates_presence_of.  I have a form, and I'm validating 
four fields using validates_presence_of..

It works fine, except that when the form comes back with the error messages, it 
is blank.  If a user enters three of the four required fields and submits the 
form, they get back a blank form with an error message and have to re-enter 
everything.

It seems to me like there must be an easy way to fix this, otherwise v_p_o is a 
total joke.

I've googled my head off to no good effect.  Can anyone offer advice?

Thanks,
JB


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