method
to_select_tag
v2.2.1 -
Show latest stable
- Class:
ActionView::Helpers::InstanceTag
to_select_tag(choices, options, html_options)public
No documentation available.
# File actionpack/lib/action_view/helpers/form_options_helper.rb, line 332
def to_select_tag(choices, options, html_options)
html_options = html_options.stringify_keys
add_default_name_and_id(html_options)
value = value(object)
selected_value = options.has_key?(:selected) ? options[:selected] : value
content_tag("select", add_options(options_for_select(choices, selected_value), options, selected_value), html_options)
end