diff options
Diffstat (limited to 'activemodel/lib/active_model/translation.rb')
-rw-r--r-- | activemodel/lib/active_model/translation.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/translation.rb b/activemodel/lib/active_model/translation.rb index c615311692..6d64c81b5f 100644 --- a/activemodel/lib/active_model/translation.rb +++ b/activemodel/lib/active_model/translation.rb @@ -44,9 +44,8 @@ module ActiveModel # 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.i18n_key.to_s.tr('.', '/')}.#{attribute}"] - end.flatten + :"#{self.i18n_scope}.attributes.#{klass.model_name.i18n_key}.#{attribute}" + end defaults << :"attributes.#{attribute}" defaults << options.delete(:default) if options[:default] |