Forum: Ruby on Rails Overriding the error_messages_for method

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community 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.
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
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)  :)

-Nick
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,
and,
to enable error
messages for multiple models to be diplayed nicely.

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

HTH !
==
Dylan
This topic is locked and can not be replied to.