Module: TableFormBuilder::ApplicationHelper::InstanceMethods

Defined in:
lib/table_form_builder/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#table_form_for(record_or_name_or_array, *args, &proc) ⇒ Object

Wraps a standard form_for inside of a table element and sets the builder to TableFormBuilder



10
11
12
13
14
15
# File 'lib/table_form_builder/application_helper.rb', line 10

def table_form_for(record_or_name_or_array, *args, &proc)
  options = args.extract_options!
  (:table, :class => "form") do
    form_for(record_or_name_or_array, *(args << options.merge(:builder => TableFormBuilder::Builder)), &proc)
  end
end