module Forme::ERB::Helper

  1. lib/forme/erb.rb

This is the module used to add the Forme integration to ERB.


Public Instance

  1. form

Public Instance methods

form (obj=nil, attr={}, opts={}, &block)

Create a Form object tied to the current output buffer, using the standard ERB hidden tags.

[show source]
   # File lib/forme/erb.rb
29 def form(obj=nil, attr={}, opts={}, &block)
30   h = {:hidden_tags=>Forme::ERB::HIDDEN_TAGS, :env=>env}
31   h[:output] = @_out_buf if block
32   (obj.is_a?(Hash) ? attr = attr.merge(h) : opts = opts.merge(h))
33   Form.form(obj, attr, opts, &block)
34 end