How can I customize Rails in order not to use the column name in the error messages? I''d like to provide custom labels to be show in the error messages. -- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Wednesday 16 May 2007, Gabriel Bogea wrote:> > How can I customize Rails in order not to use the column name in the > error messages? I''d like to provide custom labels to be show in the > error messages.Hi Gabriel, I had the same problem What I did was, copy the whole error_messages_for method from ActiveRecordHelper api.rubyonrails.org/classes/ActionView/Helpers/ActiveRecordHelper.html#M000568 and put it in my /app/helpers/application_helper.rb then I just hacked the part that builds the header_message actually my quibble was the object name, not the column names - but you should be able to do what you like to it. Maybe there is a better way though? seems this whole block of HTML should be in a view in any case. HTH Sam --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 17 May 2007, at 01:42, Gabriel Bogea wrote:> How can I customize Rails in order not to use the column name in the > error messages? I''d like to provide custom labels to be show in the > error messages.agilewebdevelopment.com/plugins/error_messages_for Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---