Module: BootstrapFormHelper::FormHelper

Defined in:
lib/bootstrap_form_helper/form_helper.rb

Instance Method Summary collapse

Instance Method Details

#bootstrap_fields_for(*args, &proc) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/bootstrap_form_helper/form_helper.rb', line 13

def bootstrap_fields_for(*args, &proc)
  options = args.extract_options!
  options.merge!(builder: BootstrapFormHelper::FormBuilder)
  set_noop_field_error_proc do
    fields_for(*(args << options), &proc)
  end
end

#bootstrap_form_for(*args, &proc) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/bootstrap_form_helper/form_helper.rb', line 5

def bootstrap_form_for(*args, &proc)
  options = args.extract_options!
  options.merge!(builder: BootstrapFormHelper::FormBuilder)
  set_noop_field_error_proc do
    form_for(*(args << options), &proc)
  end
end