Module: Formstrap::FormHelper

Defined in:
lib/formstrap/form_helper.rb

Instance Method Summary collapse

Instance Method Details

#formstrap_form_for(record, options = {}, &block) ⇒ Object



3
4
5
6
7
# File 'lib/formstrap/form_helper.rb', line 3

def formstrap_form_for(record, options = {}, &block)
  # ToDo: Can we pass info about the view here (e.g. host, protocol ...)
  options = options.reverse_merge({builder: Formstrap::FormBuilder})
  form_for(record, options, &block)
end

#formstrap_form_with(options = {}, &block) ⇒ Object



9
10
11
12
13
# File 'lib/formstrap/form_helper.rb', line 9

def formstrap_form_with(options = {}, &block)
  # ToDo: Can we pass info about the view here (e.g. host, protocol ...)
  options = options.reverse_merge({builder: Formstrap::FormBuilder})
  form_with(**options, &block)
end