aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/date_helper.rb
diff options
context:
space:
mode:
authorSven Fuchs <svenfuchs@artweb-design.de>2008-06-22 13:49:38 +0200
committerSven Fuchs <svenfuchs@artweb-design.de>2008-06-22 13:49:38 +0200
commit3533dc68120ed40a4ec44ed9900c9035108cfcf1 (patch)
treec1797a7ec6d078100e4c7f397f0a1e7229fc94ed /actionpack/lib/action_view/helpers/date_helper.rb
parent67fce4671e8bcfe2aa670a89195b20837546183a (diff)
downloadrails-3533dc68120ed40a4ec44ed9900c9035108cfcf1.tar.gz
rails-3533dc68120ed40a4ec44ed9900c9035108cfcf1.tar.bz2
rails-3533dc68120ed40a4ec44ed9900c9035108cfcf1.zip
check self.locale instead of request.locale in helpers
Diffstat (limited to 'actionpack/lib/action_view/helpers/date_helper.rb')
-rwxr-xr-xactionpack/lib/action_view/helpers/date_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb
index 0337be0744..dbb5d458bf 100755
--- a/actionpack/lib/action_view/helpers/date_helper.rb
+++ b/actionpack/lib/action_view/helpers/date_helper.rb
@@ -60,7 +60,7 @@ module ActionView
#
def distance_of_time_in_words(from_time, to_time = 0, include_seconds = false, options = {})
locale = options[:locale]
- locale ||= request.locale if respond_to?(:request)
+ locale ||= self.locale if respond_to?(:locale)
from_time = from_time.to_time if from_time.respond_to?(:to_time)
to_time = to_time.to_time if to_time.respond_to?(:to_time)
@@ -507,7 +507,7 @@ module ActionView
#
def select_month(date, options = {}, html_options = {})
locale = options[:locale]
- locale ||= request.locale if respond_to?(:request)
+ locale ||= self.locale if respond_to?(:locale)
val = date ? (date.kind_of?(Fixnum) ? date : date.month) : ''
if options[:use_hidden]