class ActionView::Helpers::InstanceTag

Public Instance Methods

to_state_select_tag(country, options, html_options) click to toggle source
# File lib/dm_core/state_select.rb, line 62
def to_state_select_tag(country, 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(state_options_for_select(selected_value, country), options, value), html_options)
end