Overriding the error_messages_for method


#1

If I wanted to override the error_messages_for method where within
the rails structure would I put it? Which file?

Thanks :slight_smile:

John K.
http://www.kopanas.com

=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference


#2

Its a built in helper function. So, if you put your own
error_messages_for method in your application.rb (or any other helper
you want) you should be good to go. (maybe) :slight_smile:

-Nick


#3

I did this not too long ago, and it works like a charm !
The reason I wanted to do this was to change the default error message,
and,
to enable error
messages for multiple models to be diplayed nicely.

Search this list for a thread titled “Multiple Model Validation”

HTH !

Dylan