From 3533dc68120ed40a4ec44ed9900c9035108cfcf1 Mon Sep 17 00:00:00 2001 From: Sven Fuchs Date: Sun, 22 Jun 2008 13:49:38 +0200 Subject: check self.locale instead of request.locale in helpers --- actionpack/lib/action_view/helpers/active_record_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers/active_record_helper.rb') diff --git a/actionpack/lib/action_view/helpers/active_record_helper.rb b/actionpack/lib/action_view/helpers/active_record_helper.rb index 5ad9d5f76d..716e303a5d 100644 --- a/actionpack/lib/action_view/helpers/active_record_helper.rb +++ b/actionpack/lib/action_view/helpers/active_record_helper.rb @@ -160,7 +160,7 @@ module ActionView count = objects.inject(0) {|sum, object| sum + object.errors.count } locale = options[:locale] - locale ||= request.locale if respond_to?(:request) + locale ||= self.locale if respond_to?(:locale) unless count.zero? html = {} -- cgit v1.2.3