Module: ActiveDryForm::FormHelper

Defined in:
lib/active_dry_form/form_helper.rb

Instance Method Summary collapse

Instance Method Details

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



6
7
8
9
10
11
12
13
14
# File 'lib/active_dry_form/form_helper.rb', line 6

def active_dry_form_for(name, options = {}, &block)
  options[:builder] = ActiveDryForm::Builder
  options[:html] = html_options(options)

  form_for(name, options) do |f|
    concat f.show_base_errors
    instance_exec(f, &block)
  end
end