Ho, I know how to overwrite an individual fields validation message using activerecord see below: validates_presence_of :name, :message => ": You must enter a contact name to send us a valid query" But how do i overwrite the default message displayed at the top so at the moment i have "2 errors prohibited this contact from being saved" and i would like to be something like "The follwoing fields have not passed validation..." JB -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Jakob Skjerning
2006-Oct-04 13:59 UTC
Re: Activerecord Validations overwrite default message
John Butler wrote:> I know how to overwrite an individual fields validation message using > activerecord see below: > > validates_presence_of :name, :message => ": You must enter a contact > name to send us a valid query" > > But how do i overwrite the default message displayed at the topYou create your very own error_messages_for helper. It can even be called something else for that matter. -- Jakob Skjerning - http://mentalized.net --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---