aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/active_record_helper.rb
diff options
context:
space:
mode:
authorSven Fuchs <svenfuchs@artweb-design.de>2008-06-23 14:37:50 +0200
committerSven Fuchs <svenfuchs@artweb-design.de>2008-06-23 14:37:50 +0200
commitc178a87b4326edd491922136c0a55bf4b889473d (patch)
tree31744dc44bb4e4eefbf9dc69d87a0b600d9ce9e5 /actionpack/lib/action_view/helpers/active_record_helper.rb
parent2ee9f2a0303cba95b2d8073fc7e22ec75229a8ee (diff)
downloadrails-c178a87b4326edd491922136c0a55bf4b889473d.tar.gz
rails-c178a87b4326edd491922136c0a55bf4b889473d.tar.bz2
rails-c178a87b4326edd491922136c0a55bf4b889473d.zip
remove call to self.locale from helpers
Diffstat (limited to 'actionpack/lib/action_view/helpers/active_record_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/active_record_helper.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/active_record_helper.rb b/actionpack/lib/action_view/helpers/active_record_helper.rb
index 716e303a5d..4ff16cd70c 100644
--- a/actionpack/lib/action_view/helpers/active_record_helper.rb
+++ b/actionpack/lib/action_view/helpers/active_record_helper.rb
@@ -159,9 +159,6 @@ module ActionView
end
count = objects.inject(0) {|sum, object| sum + object.errors.count }
- locale = options[:locale]
- locale ||= self.locale if respond_to?(:locale)
-
unless count.zero?
html = {}
[:id, :class].each do |key|
@@ -174,7 +171,7 @@ module ActionView
end
options[:object_name] ||= params.first
- I18n.with_options :locale => locale, :scope => [:active_record, :error] do |locale|
+ I18n.with_options :locale => options[:locale], :scope => [:active_record, :error] do |locale|
header_message = if options.include?(:header_message)
options[:header_message]
else