lib/active_model/translation.rb in activemodel-3.0.5 vs lib/active_model/translation.rb in activemodel-3.0.6.rc1
- old
+ new
@@ -42,10 +42,10 @@
# Person.human_attribute_name("first_name") # => "First name"
#
# Specify +options+ with additional translating options.
def human_attribute_name(attribute, options = {})
defaults = lookup_ancestors.map do |klass|
- :"#{self.i18n_scope}.attributes.#{klass.model_name.i18n_key}.#{attribute}"
+ :"#{self.i18n_scope}.attributes.#{klass.model_name.underscore}.#{attribute}"
end
defaults << :"attributes.#{attribute}"
defaults << options.delete(:default) if options[:default]
defaults << attribute.to_s.humanize