From 3daff0508bd93cfcbe8917e745a28f5a738fcdaa Mon Sep 17 00:00:00 2001 From: Colin Burn-Murdoch Date: Wed, 16 Jan 2013 18:51:34 +0000 Subject: Fix date_select :selected option so you can pass it nil --- actionpack/lib/action_view/helpers/tags/date_select.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers') 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 -- cgit v1.2.3