diff options
author | gbuesing <gbuesing@gmail.com> | 2008-05-08 22:48:47 -0500 |
---|---|---|
committer | gbuesing <gbuesing@gmail.com> | 2008-05-08 22:48:47 -0500 |
commit | 66728087d0eb99a524498e8f24725dae6073edd6 (patch) | |
tree | e8675936450de56cc4603d9057668cc365ae7113 /actionpack/lib/action_view | |
parent | 79e44a5ee484f977c2cad8a4cffe882b816340a1 (diff) | |
download | rails-66728087d0eb99a524498e8f24725dae6073edd6.tar.gz rails-66728087d0eb99a524498e8f24725dae6073edd6.tar.bz2 rails-66728087d0eb99a524498e8f24725dae6073edd6.zip |
Adding Date.current, which returns Time.zone.today if config.time_zone is set; otherwise returns Date.today. ActionView date_helper uses Date.current to determine locale-appropriate default
Diffstat (limited to 'actionpack/lib/action_view')
-rwxr-xr-x | actionpack/lib/action_view/helpers/date_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index cbd390421a..542ef3ef65 100755 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -283,7 +283,7 @@ module ActionView # # prefixed with 'payday' rather than 'date' # select_datetime(my_date_time, :prefix => 'payday') # - def select_date(date = Date.today, options = {}, html_options = {}) + def select_date(date = Date.current, options = {}, html_options = {}) options[:order] ||= [] [:year, :month, :day].each { |o| options[:order].push(o) unless options[:order].include?(o) } |