Module: Kithe::FormHelper

Defined in:
app/helpers/kithe/form_helper.rb

Instance Method Summary collapse

Instance Method Details

#kithe_form_for(object, *args, &block) ⇒ Object

Just a convenience to do simple_form_for with the Kithe::FormBuilder

Just simple_form_for with a ‘builder:` arg that defaults to Kithe::FormBuilder. This pattern is advised by simple_form: github.com/plataformatec/simple_form#custom-form-builder



7
8
9
10
11
12
# File 'app/helpers/kithe/form_helper.rb', line 7

def kithe_form_for(object, *args, &block)
  options = args.extract_options!
  options[:builder] ||= Kithe::FormBuilder

  simple_form_for(object, *(args << options), &block)
end