Module: ActiveScaffold::Bridges::CountryHelper::InstanceTagMethods
- Included in:
- ActionView::Helpers::Tags::CountrySelect
- Defined in:
- lib/active_scaffold/bridges/country_helper/country_helper_bridge.rb
Instance Method Summary collapse
- #to_country_select_tag(priority_countries, options, html_options) ⇒ Object
- #to_usa_state_select_tag(priority_states, options, html_options) ⇒ Object
Instance Method Details
#to_country_select_tag(priority_countries, options, html_options) ⇒ Object
306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/active_scaffold/bridges/country_helper/country_helper_bridge.rb', line 306 def to_country_select_tag(priority_countries, , ) = .stringify_keys add_default_name_and_id() value = value(object) selected_value = .has_key?(:selected) ? [:selected] : value content_tag("select", ( (selected_value, priority_countries), , selected_value ), ) end |
#to_usa_state_select_tag(priority_states, options, html_options) ⇒ Object
319 320 321 322 323 324 325 |
# File 'lib/active_scaffold/bridges/country_helper/country_helper_bridge.rb', line 319 def to_usa_state_select_tag(priority_states, , ) = .stringify_keys add_default_name_and_id() value = value(object) selected_value = .has_key?(:selected) ? [:selected] : value content_tag("select", ((selected_value, priority_states), , selected_value), ) end |