diff options
author | José Valim <jose.valim@gmail.com> | 2012-01-22 06:09:35 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-01-22 06:09:35 -0800 |
commit | 334e5cab2a999ef246ae0c31d0b939ef185cfe63 (patch) | |
tree | c43bd349394a46b5e206b7d8018febeee8c0165b /actionpack/lib/action_view/helpers/form_options_helper.rb | |
parent | 9ab290482284afbdc6830d84b33da03069073d4a (diff) | |
parent | c6dcc3537c09829cbbb15a6e9b133ab0bcd93988 (diff) | |
download | rails-334e5cab2a999ef246ae0c31d0b939ef185cfe63.tar.gz rails-334e5cab2a999ef246ae0c31d0b939ef185cfe63.tar.bz2 rails-334e5cab2a999ef246ae0c31d0b939ef185cfe63.zip |
Merge pull request #4604 from ihid/3-2-stable
3-2-stable: Fixed regression - unable to use a range as choices for form.select.
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_options_helper.rb')
-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: # |