From c6dcc3537c09829cbbb15a6e9b133ab0bcd93988 Mon Sep 17 00:00:00 2001 From: Jeremy Walker Date: Sun, 22 Jan 2012 13:39:15 +0000 Subject: Allow form.select to accept ranges. --- actionpack/lib/action_view/helpers/form_options_helper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb index 3ee0d8ebc5..0dd4b19573 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionpack/lib/action_view/helpers/form_options_helper.rb @@ -578,6 +578,7 @@ module ActionView def to_select_tag(choices, options, html_options) selected_value = options.has_key?(:selected) ? options[:selected] : value(object) + choices = choices.to_a if choices.is_a?(Range) # Grouped choices look like this: # -- cgit v1.2.3