instance method
extract_selected_and_disabled
Ruby on Rails 4.1.16
Since v2.3.18 PrivateSignature
extract_selected_and_disabled(selected)
No documentation comment.
Parameters
-
selectedreq
Source
# File actionview/lib/action_view/helpers/form_options_helper.rb, line 737
def extract_selected_and_disabled(selected)
if selected.is_a?(Proc)
[selected, nil]
else
selected = Array.wrap(selected)
options = selected.extract_options!.symbolize_keys
selected_items = options.fetch(:selected, selected)
[selected_items, options[:disabled]]
end
end
Defined in actionview/lib/action_view/helpers/form_options_helper.rb line 737
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::FormOptionsHelper