On 17 September 2010 11:54, Heinz Strunk <[email protected]> wrote: > as you all may know error_messages are deprecated: > DEPRECATION WARNING: f.error_messages was removed from Rails and is now > available as a plugin. Please install it with `rails plugin install > git://github.com/rails/dynamic_form.git` > > Installing the plugin of course helps but I've been googling a bit and > stuff but couldn't find the proper new Rails 3 way of handling the error > messages. Can someone please tell me how to do it without that plugin?
I believe the idea is that you can write your own helper method to format the errors exactly how you want them. You can access the error messages directly by using the #errors method on the Active Record object; for example: person.errors.full_messages Documentation for that is here: http://api.rubyonrails.org/classes/ActiveModel/Errors.html The source for the error_messages_for method in the dynamic_form plugin might also be a source of ideas: http://github.com/rails/dynamic_form/blob/master/lib/action_view/helpers/dynamic_form.rb#L183 Chris -- 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.

