module Forme::Rails::ERB

  1. lib/forme/rails.rb

Methods

Public Instance

  1. forme

Public Instance methods

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

Create a Form object tied to the current template, and using the standard Rails hidden tags.

[show source]
# File lib/forme/rails.rb, line 105
def forme(obj=nil, attr={}, opts={}, &block)
  h = {:template=>self, :hidden_tags=>Forme::Rails::HIDDEN_TAGS}
  (obj.is_a?(Hash) ? attr = attr.merge(h) : opts = opts.merge(h))
  Form.form(obj, attr, opts, &block)
end