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.
9904f8acaf66a3c1a4b4434676be11cf?d=identicon&s=25 John Kopanas (Guest)
on 2006-02-13 18: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 Kopanas

===================================================================== - source of the freshest software engineering
information on the net - software engineering conference
Cb610750ee94ca103aef4b2dc7b1b768?d=identicon&s=25 Nick Stuart (Guest)
on 2006-02-13 20: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)  :)

Ff82af3238a57fbd1212832ec1a19f28?d=identicon&s=25 Dylan Stamat (Guest)
on 2006-02-13 21: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.