Sha256: fb45682fa99ad38cd4447ef30aecd17507cebb80a99191d306210938b75c5a81
Contents?: true
Size: 326 Bytes
Versions: 2
Compression:
Stored size: 326 Bytes
Contents
def form_at(route, fields, opts={}) form = "" form << %Q{<form action="#{route}" method="post">\n} fields.each do |name, value| form << %Q{<input type="hidden" name="#{name}" value="#{value}">\n} end form << %Q{<button type="submit" class="btn">#{opts[:submit] || "submit"}</button>} form << %Q{</form>} end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
juici-0.0.1.alpha1 | lib/juici/helpers/form_helpers.rb |
juici-0.0.0.alpha1 | lib/juici/helpers/form_helpers.rb |