Module: Forme::ERB::Helper
- Defined in:
- lib/forme/erb.rb
Overview
This is the module used to add the Forme integration to ERB.
Instance Method Summary collapse
-
#form(obj = nil, attr = {}, opts = {}, &block) ⇒ Object
Create a
Form
object tied to the current output buffer, using the standard ERB hidden tags.
Instance Method Details
#form(obj = nil, attr = {}, opts = {}, &block) ⇒ Object
Create a Form
object tied to the current output buffer, using the standard ERB hidden tags.
93 94 95 96 97 98 |
# File 'lib/forme/erb.rb', line 93 def form(obj=nil, attr={}, opts={}, &block) h = {:hidden_tags=>Forme::ERB::HIDDEN_TAGS, :env=>env} h[:output] = @_out_buf if block (obj.is_a?(Hash) ? attr = attr.merge(h) : opts = opts.merge(h)) Form.form(obj, attr, opts, &block) end |