Module: ActionView::Helpers::FormHelper

Defined in:
lib/html5_validators/action_view/form_helpers_rails3.rb

Instance Method Summary collapse

Instance Method Details

#form_for_with_auto_html5_validation_option(record, options = {}, &proc) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/html5_validators/action_view/form_helpers_rails3.rb', line 6

def form_for_with_auto_html5_validation_option(record, options = {}, &proc)
  if record.respond_to?(:auto_html5_validation=)
    if !Html5Validators.enabled || (options[:auto_html5_validation] == false)
      record.auto_html5_validation = false
    end
  end
  form_for_without_auto_html5_validation_option record, options, &proc
end