Hi when validation fails it says the standard field name + message. Is
there a way to change the field name that is displayed without changing
the name of the column in the database and all other references to it?
Regards
Clare
On 30 Aug 2006, at 11:36, Clare wrote:
Hi when validation fails it says the standard field name + message. Is
there a way to change the field name that is displayed without
changing
the name of the column in the database and all other references to it?
Regards
Clare
Hi Clare,
I’m having to do something similar but will have to write my own
“error_messages_for” method. You’ll probably have to do the same. You
can just copy the error_messages_for method code and re-write it to
suit, then stick it in a library perhaps.
Unless anyone has any better suggestions?
Alastair
Alastair M.
Standards compliant web development with Ruby On Rails, PHP and ASP
www.kozmo.co.uk
07738 399038
Clare wrote:
Hi when validation fails it says the standard field name + message. Is
there a way to change the field name that is displayed without changing
the name of the column in the database and all other references to it?
Regards
Clare
Hi Clare, take a look at http://rubyforge.org/projects/custom-err-msg/
should do what you want.
This plugin may be useful: http://agilewebdevelopment.com/plugins/
enhanced_activerecord_errors
–
Building an e-commerce site with Rails?
http://www.agilewebdevelopment.com/rails-ecommerce
Thank you all will look into all those options.
regards
c