module Forme::Template::Helper

  1. lib/forme/template.rb

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

Methods

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/template.rb
59 def form(obj=nil, attr={}, opts={}, &block)
60   if obj.is_a?(Hash)
61     attribs = obj
62     options = attr = attr.dup
63   else
64     attribs = attr
65     options = opts = opts.dup
66   end
67 
68   _forme_form_options(obj, attribs, options)
69   _forme_form(obj, attr, opts, &block)
70 end