aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/translation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/translation.rb')
-rw-r--r--activemodel/lib/active_model/translation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/translation.rb b/activemodel/lib/active_model/translation.rb
index 920a133159..dbb76244e4 100644
--- a/activemodel/lib/active_model/translation.rb
+++ b/activemodel/lib/active_model/translation.rb
@@ -44,7 +44,7 @@ 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.underscore}.#{attribute}"
end
defaults << :"attributes.#{attribute}"