Module: ActiveScaffold::Bridges::CountryHelper::CountryHelpers
- Defined in:
- lib/active_scaffold/bridges/country_helper/country_helper_bridge.rb
Instance Method Summary collapse
-
#country_select(object, method, priority_countries = nil, options = {}, html_options = {}) ⇒ Object
Return select and option tags for the given object and method, using country_options_for_select to generate the list of option tags.
- #country_select_class ⇒ Object
- #usa_state_select(object, method, priority_states = nil, options = {}, html_options = {}) ⇒ Object
Instance Method Details
#country_select(object, method, priority_countries = nil, options = {}, html_options = {}) ⇒ Object
Return select and option tags for the given object and method, using country_options_for_select to generate the list of option tags.
9 10 11 |
# File 'lib/active_scaffold/bridges/country_helper/country_helper_bridge.rb', line 9 def country_select(object, method, priority_countries = nil, = {}, = {}) country_select_class.new(object, method, self, ).to_country_select_tag(priority_countries, , ) end |
#country_select_class ⇒ Object
4 5 6 |
# File 'lib/active_scaffold/bridges/country_helper/country_helper_bridge.rb', line 4 def country_select_class defined?(ActionView::Helpers::InstanceTag) ? ActionView::Helpers::InstanceTag : ActionView::Helpers::Tags::CountrySelect end |
#usa_state_select(object, method, priority_states = nil, options = {}, html_options = {}) ⇒ Object
13 14 15 |
# File 'lib/active_scaffold/bridges/country_helper/country_helper_bridge.rb', line 13 def usa_state_select(object, method, priority_states = nil, = {}, = {}) country_select_class.new(object, method, self, ).to_usa_state_select_tag(priority_states, , ) end |