Module: Enumerize::Hooks::FormtasticFormBuilderExtension
- Defined in:
- lib/enumerize/hooks/formtastic.rb
Instance Method Summary collapse
Instance Method Details
#input(method, options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/enumerize/hooks/formtastic.rb', line 7 def input(method, ={}) klass = object.class if klass.respond_to?(:enumerized_attributes) && (attr = klass.enumerized_attributes[method]) [:collection] ||= attr. if attr.kind_of?(Enumerize::Multiple) && [:as] != :check_boxes [:input_html] = .fetch(:input_html, {}).merge(:multiple => true) end end super(method, ) end |