module ActiveScaffold::Bridges::UsaStateSelect::InstanceTagMethods
Public Instance Methods
to_usa_state_select_tag(priority_states, options, html_options)
click to toggle source
# File lib/active_scaffold/bridges/usa_state_select/usa_state_select_helper.rb, line 39 def to_usa_state_select_tag(priority_states, options, html_options) html_options = html_options.stringify_keys add_default_name_and_id(html_options) value = value(object) selected_value = options.key?(:selected) ? options[:selected] : value content_tag('select', add_options(usa_state_options_for_select(selected_value, priority_states), options, selected_value), html_options) end