aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/errors.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-04-30 18:40:24 +0200
committerJosé Valim <jose.valim@gmail.com>2010-05-01 12:54:52 +0200
commit13867a3f5f3e2248660a942956985a4eacacb283 (patch)
treebb6bc41d0f5bff725e379b712cb75751a9813a3f /activemodel/lib/active_model/errors.rb
parentefba1d4227514a6ce4880910a6531b0a6c3c75aa (diff)
downloadrails-13867a3f5f3e2248660a942956985a4eacacb283.tar.gz
rails-13867a3f5f3e2248660a942956985a4eacacb283.tar.bz2
rails-13867a3f5f3e2248660a942956985a4eacacb283.zip
Use %{} syntax in I18n (faster) instead of {{}}.
Diffstat (limited to 'activemodel/lib/active_model/errors.rb')
-rw-r--r--activemodel/lib/active_model/errors.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index e6c86c7843..14afc5265f 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -223,7 +223,7 @@ module ActiveModel
else
attr_name = attribute.to_s.gsub('.', '_').humanize
attr_name = @base.class.human_attribute_name(attribute, :default => attr_name)
- options = { :default => "{{attribute}} {{message}}", :attribute => attr_name }
+ options = { :default => "%{attribute} %{message}", :attribute => attr_name }
messages.each do |m|
full_messages << I18n.t(:"errors.format", options.merge(:message => m))