I find sinatra-formhelpers useful and use it in some projects. Check out their Github page , the code is pretty simple and maybe just what you are looking for. Even if not, you can easily add your specialized helpers. You can just install it with
gem install sinatra-formhelpers
and use it, requiring a gem:
require 'sinatra/form_helpers'
or, if you are a subclass of Sinatra::Base , optionally including helpers:
class MyApp < Sinatra::Base helpers Sinatra::FormHelpers
After all, part of Sinatra's philosophy should be as light as possible. Therefore, if you want all the fancy stuff to be built in, Sinatra might just not be the right tool.
source share