Module: ActionView::Helpers::ToCountrySelectCodeTag

Included in:
CountrySelectCode, InstanceTag
Defined in:
lib/country-select-code.rb

Instance Method Summary collapse

Instance Method Details

#to_country_select_code_tag(priority_countries, options, html_options) ⇒ Object



133
134
135
136
137
138
139
140
141
142
143
# File 'lib/country-select-code.rb', line 133

def to_country_select_code_tag(priority_countries, options, html_options)
  html_options = html_options.stringify_keys
  add_default_name_and_id(html_options)
  value = value(object)
  ("select",
    add_options(
      country_options_for_select(value, priority_countries, options),
      options, value
    ), html_options
  )
end