aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/errors.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-03-05 12:06:43 +0100
committerXavier Noria <fxn@hashref.com>2011-03-05 12:06:43 +0100
commit9092052cb010ab9155cff196ef139cec41695324 (patch)
tree6b8f39ddddef07105820ce825260ebc4e265b12a /activemodel/lib/active_model/errors.rb
parent34f5628a072f7afa677d25c9559076d5c21721ce (diff)
parent20768176292cbcb883ab152b4aa9ed8c664771cd (diff)
downloadrails-9092052cb010ab9155cff196ef139cec41695324.tar.gz
rails-9092052cb010ab9155cff196ef139cec41695324.tar.bz2
rails-9092052cb010ab9155cff196ef139cec41695324.zip
merges rails
Diffstat (limited to 'activemodel/lib/active_model/errors.rb')
-rw-r--r--activemodel/lib/active_model/errors.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index 5e3cf510b0..c2f0228785 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -295,8 +295,8 @@ module ActiveModel
type = options.delete(:message) if options[:message].is_a?(Symbol)
defaults = @base.class.lookup_ancestors.map do |klass|
- [ :"#{@base.class.i18n_scope}.errors.models.#{klass.model_name.i18n_key}.attributes.#{attribute}.#{type}",
- :"#{@base.class.i18n_scope}.errors.models.#{klass.model_name.i18n_key}.#{type}" ]
+ [ :"#{@base.class.i18n_scope}.errors.models.#{klass.model_name.underscore}.attributes.#{attribute}.#{type}",
+ :"#{@base.class.i18n_scope}.errors.models.#{klass.model_name.underscore}.#{type}" ]
end
defaults << options.delete(:message)