Module: ActionView::Helpers::ToStateSelectTag
- Included in:
- InstanceTag, StateSelect
- Defined in:
- lib/i18n_plus/state.rb
Instance Method Summary collapse
Instance Method Details
#to_state_select_tag(country_code, options, html_options) ⇒ Object
41 42 43 44 45 46 47 48 49 |
# File 'lib/i18n_plus/state.rb', line 41 def to_state_select_tag(country_code, , ) .symbolize_keys! .stringify_keys! add_default_name_and_id() _, value = option_text_and_value(object) selected_value = .has_key?(:selected) ? [:selected] : value opts = ((country_code, selected_value), , value) content_tag(:select, opts, ) end |