class Roda::RodaPlugins::FormeSet::Form

  1. lib/roda/plugins/forme_set.rb
Superclass: Form

Forme::Form subclass that adds hidden fields with metadata that can be used to automatically process form submissions.

Methods

Public Class

  1. new

Public Instance

  1. form

Public Class methods

new (obj, opts=nil)
[show source]
   # File lib/roda/plugins/forme_set.rb
40 def initialize(obj, opts=nil)
41   super
42   @forme_namespaces = @opts[:namespace]
43 end

Public Instance methods

form (*)

Try adding hidden fields to all forms

[show source]
   # File lib/roda/plugins/forme_set.rb
46 def form(*)
47   if block_given?
48     super do |f|
49       yield f
50       hmac_hidden_fields
51     end
52   else
53     t = super
54     if tags = hmac_hidden_fields
55       tags.each{|tag| t << tag}
56     end
57     t
58   end
59 end