diff options
author | José Valim <jose.valim@gmail.com> | 2012-01-24 11:35:11 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-01-24 11:35:11 -0800 |
commit | 5a66d33e28e1eed5c424d46c72ab348d7f8202e3 (patch) | |
tree | 6fe6942dbd9b0e9bf1f7cdb7cab5be6e28820b0d /actionpack/lib/action_view | |
parent | e0fe62b926956bc4ae6a3219c2c8473431007531 (diff) | |
parent | c4b7ca06a4f80983a531b1e5094043be1e13f53a (diff) | |
download | rails-5a66d33e28e1eed5c424d46c72ab348d7f8202e3.tar.gz rails-5a66d33e28e1eed5c424d46c72ab348d7f8202e3.tar.bz2 rails-5a66d33e28e1eed5c424d46c72ab348d7f8202e3.zip |
Merge pull request #4641 from rafaelfranca/date_select-fix-3-2
date_select fixes [3-2-stable]
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/date_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index 2806348337..656564c106 100644 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -734,7 +734,7 @@ module ActionView def select_day if @options[:use_hidden] || @options[:discard_day] - build_hidden(:day, day) + build_hidden(:day, day || 1) else build_options_and_select(:day, day, :start => 1, :end => 31, :leading_zeros => false, :use_two_digit_numbers => @options[:use_two_digit_numbers]) end @@ -742,7 +742,7 @@ module ActionView def select_month if @options[:use_hidden] || @options[:discard_month] - build_hidden(:month, month) + build_hidden(:month, month || 1) else month_options = [] 1.upto(12) do |month_number| @@ -756,7 +756,7 @@ module ActionView def select_year if !@datetime || @datetime == 0 - val = '' + val = '1' middle_year = Date.today.year else val = middle_year = year |