Module: Forme::Sinatra
- Defined in:
- lib/forme/sinatra.rb
Defined Under Namespace
Constant Summary collapse
- HIDDEN_TAGS =
[]
- Erubis =
Alias of
Forme::Sinatra::ERB
ERB
Class Method Summary collapse
-
.add_hidden_tag(&block) ⇒ Object
Add a hidden tag proc that will be used for all forms created via Forme::Sinatra::ERB#form.
Class Method Details
.add_hidden_tag(&block) ⇒ Object
Add a hidden tag proc that will be used for all forms created via Forme::Sinatra::ERB#form. The block is yielded the Forme::Tag object for the form tag. The block should return either nil if hidden tag should be added, or a Forme::Tag object (or an array of them), or a hash with keys specifying the name of the tags and the values specifying the values of the tags .
11 12 13 |
# File 'lib/forme/sinatra.rb', line 11 def self.add_hidden_tag(&block) HIDDEN_TAGS << block end |