Module: Enumerize::Hooks::FormtasticFormBuilderExtension
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/enumerize/hooks/formtastic.rb
Instance Method Summary collapse
Instance Method Details
#input_with_enumerize(method, options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/enumerize/hooks/formtastic.rb', line 12 def input_with_enumerize(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 input_without_enumerize(method, ) end |