Activerecord Validations overwrite default message

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

John B. 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 top

You create your very own error_messages_for helper. It can even be
called something else for that matter.


Jakob S. - http://mentalized.net