aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/errors.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-12-31 14:14:29 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-02 22:27:02 +0100
commit7cc0a4cfa1d18c011d6e41f57d25eb10ed018eba (patch)
tree36e56a57e7aad463213c038dd8a2848e5cb94c48 /activemodel/lib/active_model/errors.rb
parent5fdd0e80a4db778268e80435b471090cb14f7229 (diff)
downloadrails-7cc0a4cfa1d18c011d6e41f57d25eb10ed018eba.tar.gz
rails-7cc0a4cfa1d18c011d6e41f57d25eb10ed018eba.tar.bz2
rails-7cc0a4cfa1d18c011d6e41f57d25eb10ed018eba.zip
Use activerecord.errors.format as in Rails 2.3.5.
Diffstat (limited to 'activemodel/lib/active_model/errors.rb')
-rw-r--r--activemodel/lib/active_model/errors.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index 262a1ef22b..abc084a74b 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -105,11 +105,11 @@ module ActiveModel
else
attr_name = attribute.to_s.gsub('.', '_').humanize
attr_name = @base.class.human_attribute_name(attribute, :default => attr_name)
- options = { :default => ' ', :scope => @base.class.i18n_scope }
- prefix = attr_name + I18n.t(:"errors.format.separator", options)
+ options = { :default => "{{attribute}} {{message}}", :attribute => attr_name,
+ :scope => @base.class.i18n_scope }
messages.each do |m|
- full_messages << "#{prefix}#{m}"
+ full_messages << I18n.t(:"errors.format", options.merge(:message => m))
end
end
end