Skip to content
Browse files

Refactor extract_selected_and_disabled

  • Loading branch information...
1 parent 2ed1797 commit 1de3f63e157797e3c153943e3d798b31d9c071eb @rafaelfranca rafaelfranca committed Jan 5, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 actionpack/lib/action_view/helpers/form_options_helper.rb
View
3 actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -558,7 +558,8 @@ def extract_selected_and_disabled(selected)
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

0 comments on commit 1de3f63

Please sign in to comment.
Something went wrong with that request. Please try again.