View Components for Sinatra
Cells are object-oriented view components for your MVC-apps. They provide a decent way for encapsulating logic and rendering - thus helping in creating reusable widgets.
For a detailed discussion on cells see github.com/apotonick/cells
Rendering cells in your Sinatra app is easy.
require 'cells-sinatra' MyApp < Sinatra::Base helpers Cells::Sinatra get "/" do @top_posts = render_cell(:post, :top10) # ... do more end
Copyright © 2010, Nick Sutterer
Released under the MIT License.