method
to_collection_select_tag
to_collection_select_tag(collection, value_method, text_method, options, html_options)
public
Hide source
# File actionpack/lib/action_view/helpers/form_options_helper.rb, line 480 def to_collection_select_tag(collection, value_method, text_method, options, html_options) html_options = html_options.stringify_keys add_default_name_and_id(html_options) value = value(object) disabled_value = options.has_key?(:disabled) ? options[:disabled] : nil selected_value = options.has_key?(:selected) ? options[:selected] : value content_tag( "select", add_options(options_from_collection_for_select(collection, value_method, text_method, :selected => selected_value, :disabled => disabled_value), options, value), html_options ) end


