aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/active_record_helper.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-04-01 11:24:00 +0200
committerMichael Koziarski <michael@koziarski.com>2009-04-05 21:08:14 +1200
commit1ab7c37671d7c0cd9d8698bd462916a7e6f95470 (patch)
tree0281185b8aaa208449538158106adedb7e964e9f /actionpack/lib/action_view/helpers/active_record_helper.rb
parent42cdc7571d115c5eb4ece440001d221f24553100 (diff)
downloadrails-1ab7c37671d7c0cd9d8698bd462916a7e6f95470.tar.gz
rails-1ab7c37671d7c0cd9d8698bd462916a7e6f95470.tar.bz2
rails-1ab7c37671d7c0cd9d8698bd462916a7e6f95470.zip
Object names with underscore do the wrong lookup in I18n on error_messages_for.
Signed-off-by: Michael Koziarski <michael@koziarski.com> [#2390 state:committed]
Diffstat (limited to 'actionpack/lib/action_view/helpers/active_record_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/active_record_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/active_record_helper.rb b/actionpack/lib/action_view/helpers/active_record_helper.rb
index 541899ea6a..7c0dfdab10 100644
--- a/actionpack/lib/action_view/helpers/active_record_helper.rb
+++ b/actionpack/lib/action_view/helpers/active_record_helper.rb
@@ -194,7 +194,7 @@ module ActionView
options[:header_message]
else
object_name = options[:object_name].to_s.gsub('_', ' ')
- object_name = I18n.t(object_name, :default => object_name, :scope => [:activerecord, :models], :count => 1)
+ object_name = I18n.t(options[:object_name].to_s, :default => object_name, :scope => [:activerecord, :models], :count => 1)
locale.t :header, :count => count, :model => object_name
end
message = options.include?(:message) ? options[:message] : locale.t(:body)