public Method

InstanceTag.to_select_tag(choices, options, html_options)

There's no documentation for this item.

Source Code

# File action_view/helpers/form_options_helper.rb, line 364
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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.