Module: GenericFormFor::Helpers::InputHelper

Included in:
FormBuilder
Defined in:
lib/generic_form_for/helpers/input_helper.rb

Instance Method Summary collapse

Instance Method Details

#input(method, options = {}) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/generic_form_for/helpers/input_helper.rb', line 5

def input(method, options = {})
  options = options.dup
  options[:as] ||= default_input_type(method, options)
  
  klass = input_class(options[:as])
  klass.new(self, template, @object, @object_name, method, column_for(method), options).to_html
end