I’ve been trying to say this:
I responded just a bit ago, but I don’t see my response, so hopefully
there won’t be two responses…
Essentially, Drew, you can map the column to be something else when
you call “humanize” on it. Try this:
class Post < ActiveRecord::Base
HUMANIZED_COLUMNS = {:msg => “Message”}
def self.human_attribute_name(attribute)
HUMANIZED_COLUMNS[attribute.to_sym] || super
end
end
HTH,
Richard
On Sep 25, 4:49 pm, drewB [email protected] wrote:
Is there an easy way to customize the display name of the attributed
used in a validation error message. For example, let’s say I have an
active record with the attribute :msg that is validated for presence.
If is doesn’t exist I don’t want the user to see “msg can’t be
blank!” I want it to say “Message can’t be blank!” Is there an easy
way to do that?
When I respond either through the web interface or in email, it says
it’s successful (in the browser), but my answers are not listed…
this was hours ago. Do I need to gain approval before posting
responses?