Module: SimpleForm::ActionViewExtensions::FormHelper

Defined in:
lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb

Instance Method Summary collapse

Instance Method Details

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



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb', line 6

def simple_form_for(record, options={}, &block)
  options[:builder] ||= SimpleForm::FormBuilder
  options[:html] ||= {}
  unless options[:html].key?(:novalidate)
    options[:html][:novalidate] = !SimpleForm.browser_validations
  end

  with_custom_field_error_proc do
    form_for(record, options, &block)
  end
end