Friday, October 16, 2009

[Rails] Re: Create and error_messages

Pål Bergström wrote:
> Pål Bergström wrote:
>
> Does it matter, for the error_message_for to be displayed, if I use
> form_tag or form_for?

You're completely ignoring the advice that Marnen and Patrick gave. Your
Create controller method is incorrect. You're not handling the case when
the save method fails (due to validation errors). Re-read what Marnen
posted about what happens when @customer.save returns false, and compare
your create method with Patrick's...
--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate