0.0
No commit activity in last 3 years
No release in over 3 years
A set of Sinatra HTML view helpers to make your life nicer and easier. Helpers for forms, links, and assets.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

 Project Readme

Nice 'n' Easy

"Lets take it nice and easy
Its gonna be so easy
...
cause nice and easy does it every time"

A set of Sinatra HTML view helpers to make your life nicer and easier. It includes helpers for form fields, links, and assets.

In designing the library I tried to limit my use of external libs as much as possible. In particular, I found a number of similar Sinatra HTML helpers but a number included all of ActiveSupport. ActiveSupport's "blank" functionality is included here, and I copy "extract_options!" and "symbolize_keys" from there too but I add nothing else. Although if you include ActiveSupport yourself the label helper will take advantage of the titleize method.

Another influence on my design was ease of compatibility with mustache. This meant that methods like form_for that take a block should be avoided, as these would be harder to implement in a mustache (although not impossible).

Install & Usage

Install:

sudo gem install nice-n-easy --source http://gemcutter.org

Add this to your Sinatra app:

require 'sinatra/nice_easy_helpers'

class Main < Sinatra::Base
  helpers Sinatra::NiceEasyHelpers
end

See the RDocs for how to use the individual helpers

Note on Patches/Pull Requests

  • Fork the project.
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rake file, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2009 Brian Landau. See LICENSE for details.