1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Refactor extract_selected_and_disabled

This commit is contained in:
Rafael Mendonça França 2012-01-05 17:58:54 -03:00
parent 2ed17977ac
commit 1de3f63e15

View file

@ -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