David Kahn
2010-Aug-24 15:15 UTC
ActiveRecord display different text for attribute on validation
What is the best way to tell rails to output a different name in the validation presented to the user than the actual attribute? I have a field "trade_attached_pdf" Which AR creates the error message "Trade attached pdf may only be in pdf format" But I want the message to read "Attached pdf may only be in pdf format" I found human_attribute_name in AR.base but is not clear how to implement. I have not done much with I18n, is that where I should perhaps be looking instead? David -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
