Sha256: 41b54661fdfa9c7998636ec163037b6c0a265252c414b01b611e4efcbfb21354
Contents?: true
Size: 267 Bytes
Versions: 3
Compression:
Stored size: 267 Bytes
Contents
require 'sinatra/base' require 'cubbyhole' require 'haml' class Example < Sinatra::Base get "/" do @posts = Post.all haml :index end get "/posts/new" do haml :new end post "/posts" do Post.create(params[:post]) redirect "/" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cubbyhole-0.2.1 | example/example.rb |
cubbyhole-0.2.0 | example/example.rb |
cubbyhole-0.1.1 | example/example.rb |