HowTo: Changing the column name in a model for validation
September 21, 2009 1 Comment
Sample code taken from here.
class User > ActiveRecord::Base
HUMANIZED_ATTRIBUTES = {
:email => “E-mail address”
}def self.human_attribute_name(attr)
HUMANIZED_ATTRIBUTES[attr.to_sym] || super
endend