diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-16 13:56:37 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-16 13:56:37 -0800 |
commit | 89b0f4230f5302c2add13d0a1f2e99d66105b39e (patch) | |
tree | d2e4ed487f8e80ed934c2f839081173ad8dac070 /actionpack/lib | |
parent | 555cb0afb5a8a8e98fc982edb9e09dfaafd46380 (diff) | |
parent | 3daff0508bd93cfcbe8917e745a28f5a738fcdaa (diff) | |
download | rails-89b0f4230f5302c2add13d0a1f2e99d66105b39e.tar.gz rails-89b0f4230f5302c2add13d0a1f2e99d66105b39e.tar.bz2 rails-89b0f4230f5302c2add13d0a1f2e99d66105b39e.zip |
Merge pull request #8965 from colinbm/date_select_value
Fix date_select :selected option so you can pass it nil
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/tags/date_select.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/tags/date_select.rb b/actionpack/lib/action_view/helpers/tags/date_select.rb index 380d6d3686..734591394b 100644 --- a/actionpack/lib/action_view/helpers/tags/date_select.rb +++ b/actionpack/lib/action_view/helpers/tags/date_select.rb @@ -27,7 +27,7 @@ module ActionView end def datetime_selector(options, html_options) - datetime = options[:selected] || value(object) || default_datetime(options) + datetime = options.fetch(:selected) { value(object) || default_datetime(options) } @auto_index ||= nil options = options.dup |