Module: ActiveScaffold::Bridges::UsaStateSelect::UsaStateSelectHelpers

Defined in:
lib/active_scaffold/bridges/usa_state_select/usa_state_select_helper.rb

Instance Method Summary collapse

Instance Method Details

#usa_state_select(object, method, priority_states = nil, options = {}, html_options = {}) ⇒ Object


9
10
11
# File 'lib/active_scaffold/bridges/usa_state_select/usa_state_select_helper.rb', line 9

def usa_state_select(object, method, priority_states = nil, options = {}, html_options = {})
  ActionView::Helpers::Tags::UsaStateSelect.new(object, method, self, usa_state_select_options(options)).to_usa_state_select_tag(priority_states, options, html_options)
end

#usa_state_select_options(options) ⇒ Object


4
5
6
7
# File 'lib/active_scaffold/bridges/usa_state_select/usa_state_select_helper.rb', line 4

def usa_state_select_options(options)
  # TODO: remove when rails 3.2 support is dropped
  defined?(ActionView::Helpers::InstanceTag) ? options[:object] : options
end