Module: Forme::Template::Helper
- Defined in:
- lib/forme/template.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.
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/forme/template.rb', line 59 def form(obj=nil, attr={}, opts={}, &block) if obj.is_a?(Hash) attribs = obj = attr = attr.dup else attribs = attr = opts = opts.dup end (obj, attribs, ) _forme_form(obj, attr, opts, &block) end |