diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-01-05 17:58:54 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-01-05 17:58:54 -0300 |
commit | 1de3f63e157797e3c153943e3d798b31d9c071eb (patch) | |
tree | 1bd12052218ec05adfe4754507d629201ddeea2f | |
parent | 2ed17977acb288310d5455f1d716faba2202ba0c (diff) | |
download | rails-1de3f63e157797e3c153943e3d798b31d9c071eb.tar.gz rails-1de3f63e157797e3c153943e3d798b31d9c071eb.tar.bz2 rails-1de3f63e157797e3c153943e3d798b31d9c071eb.zip |
Refactor extract_selected_and_disabled
-rw-r--r-- | actionpack/lib/action_view/helpers/form_options_helper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb index 48965dafea..5622414129 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionpack/lib/action_view/helpers/form_options_helper.rb @@ -558,7 +558,8 @@ module ActionView else selected = Array.wrap(selected) options = selected.extract_options!.symbolize_keys - [ options.include?(:selected) ? options[:selected] : selected, options[:disabled] ] + selected_items = options.include?(:selected) ? options[:selected] : selected + [ selected_items, options[:disabled] ] end end |