No commit activity in last 3 years
No release in over 3 years
use basic form helpers for generic form management
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 2.3.2.0
>= 0.9.2.0
 Project Readme

sinatra-formhelpers¶ ↑

sinatra-formhelpers is a suite of form helpers for sinatra.

link "google", "http://www.google.com"            # Returns "<a href='http://www.google.com'>google</a>"
label :person, :first_name         # Returns "<label for='person_first_name'>First Name</label>"
text :person, :first_name  # Returns "<input name='person[first_name]' id='person_first_name' value='' type='text' />"

There are also helpers for (area, submit, image, radio, checkbox, and select)

To install it, run:

sudo gem install twilson63-sinatra-formhelpers -s gems.github.com

To include it in a Sinatra application, write:

require 'rubygems'
require 'sinatra/formhelpers'

If you’re subclassing Sinatra::Base, then you need to call helpers manually:

class MyApp < Sinatra::Base
  helpers Sinatra::FormHelpers
  # ...
end

Copyright © 2009 twilson63. See LICENSE for details.