Forum: Ruby on Rails Overriding the error_messages_for method

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
John K. (Guest)
on 2006-02-13 19:59
(Received via mailing list)
If I wanted to override the error_messages_for method where within
the rails structure would I put it?  Which file?

Thanks :-)

John K.

===================================================================== - source of the freshest software engineering
information on the net - software engineering conference
Nick S. (Guest)
on 2006-02-13 21:46
(Received via mailing list)
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)  :)

Dylan S. (Guest)
on 2006-02-13 22:06
(Received via mailing list)
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,
to enable error
messages for multiple models to be diplayed nicely.

Search this list for a thread titled  "Multiple Model Validation"

This topic is locked and can not be replied to.