aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/active_record_helper.rb
diff options
context:
space:
mode:
authorLuca Guidi <guidi.luca@gmail.com>2008-07-08 11:53:19 +0200
committerLuca Guidi <guidi.luca@gmail.com>2008-07-08 11:53:19 +0200
commit2949918b4cea26435d1f0a076fe884c8113b40fa (patch)
tree4247e3535b1ea9c3c651f4e191a06427a3f119ad /actionpack/lib/action_view/helpers/active_record_helper.rb
parent826c3db42105518b3a88cf56e348b48c1660f850 (diff)
downloadrails-2949918b4cea26435d1f0a076fe884c8113b40fa.tar.gz
rails-2949918b4cea26435d1f0a076fe884c8113b40fa.tar.bz2
rails-2949918b4cea26435d1f0a076fe884c8113b40fa.zip
Make sure object name is translated in #error_messages_for
Diffstat (limited to 'actionpack/lib/action_view/helpers/active_record_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/active_record_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/active_record_helper.rb b/actionpack/lib/action_view/helpers/active_record_helper.rb
index 4ff16cd70c..a2fee53fb6 100644
--- a/actionpack/lib/action_view/helpers/active_record_helper.rb
+++ b/actionpack/lib/action_view/helpers/active_record_helper.rb
@@ -176,6 +176,7 @@ module ActionView
options[:header_message]
else
object_name = options[:object_name].to_s.gsub('_', ' ')
+ object_name = I18n.t(object_name, :default => object_name) || ''
locale.t :header_message, :count => count, :object_name => object_name
end
message = options.include?(:message) ? options[:message] : locale.t(:message)