James' Blog

James’ personal blog
Previous Post:   Next Post:

change validation error names in rails

Put the below code in to your model.  I found this info on railsforums.com.

HUMANIZED_COLUMNS = {
:Column_name => “New Name”,
:OtherColumn_name => “New Name 2″
}
def self.human_attribute_name(attribute)
HUMANIZED_COLUMNS[attribute.to_sym] || super
end

Tags:

Posted in Ruby on Rails 9 months ago at 2:01 pm.

Add a comment

Comments are closed.