Module: FormtasticStateSelect

Defined in:
lib/formtastic_state_select.rb

Instance Method Summary collapse

Instance Method Details

#state_input(method, options) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/formtastic_state_select.rb', line 3

def state_input(method, options)
  raise "To use the :state input, please install the state_select plugin http://github.com/sprsquish/state_select" unless self.respond_to?(:state_select)

  html_options = options.delete(:input_html) || {}

  self.label(method, options_for_label(options)) <<
    self.state_select(method, strip_formtastic_options(options), html_options)
end