diff options
author | Jeremy Walker <jez.walker@gmail.com> | 2012-01-22 13:39:15 +0000 |
---|---|---|
committer | Jeremy Walker <jez.walker@gmail.com> | 2012-01-22 13:39:15 +0000 |
commit | c6dcc3537c09829cbbb15a6e9b133ab0bcd93988 (patch) | |
tree | 463a1e4419dc9a2330d287d8c878becb36076fe1 /actionpack/lib/action_view | |
parent | fab664a8e9c94d7e3c52fed70ea2c0f569d142fb (diff) | |
download | rails-c6dcc3537c09829cbbb15a6e9b133ab0bcd93988.tar.gz rails-c6dcc3537c09829cbbb15a6e9b133ab0bcd93988.tar.bz2 rails-c6dcc3537c09829cbbb15a6e9b133ab0bcd93988.zip |
Allow form.select to accept ranges.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_options_helper.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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: # |