Class: ActionView::Helpers::InstanceTag
- Includes:
- FormOptionsHelper, CountryHelpers
- Defined in:
- lib/active_scaffold/extensions/usa_state.rb,
lib/active_scaffold/helpers/country_helpers.rb,
lib/active_scaffold/extensions/name_option_for_datetime.rb
Overview
:nodoc:
Constant Summary
Constants included from FormOptionsHelper
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
Methods included from FormOptionsHelper
#usa_state_options_for_select, #usa_state_select
Instance Method Details
#to_country_select_tag(priority_countries, options, html_options) ⇒ Object
301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/active_scaffold/helpers/country_helpers.rb', line 301 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
38 39 40 41 42 43 |
# File 'lib/active_scaffold/extensions/usa_state.rb', line 38 def to_usa_state_select_tag(priority_states, , ) = .stringify_keys add_default_name_and_id() value = value(object) if method(:value).arity > 0 content_tag("select", ((value, priority_states), , value), ) end |