Module: Tungsten::FormForHelper

Defined in:
app/helpers/tungsten/form_for_helper.rb

Defined Under Namespace

Classes: TungstenFormBuilder

Instance Method Summary collapse

Instance Method Details

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



18
19
20
21
22
23
# File 'app/helpers/tungsten/form_for_helper.rb', line 18

def tungsten_form_for(values, options = {}, &block)
  errors = options.delete(:errors) || values.try(:errors) || {}

  body = capture TungstenFormBuilder.new(self, values, errors), &block
  form_tag_with_body options, body
end