Skip to content

Instantly share code, notes, and snippets.

@hayeah
Created December 10, 2009 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hayeah/253716 to your computer and use it in GitHub Desktop.
Save hayeah/253716 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra/base'
require 'dress'
require 'pp'
class Site < Dress::Maker
layout {
html {
head { title("Admin") }
body { content }
}
}
def hello(name)
div("hello #{name}")
end
end
class Simple < Sinatra::Base
get "/hello/:name" do
pp params
Site.render(:hello,params["name"]).to_s
end
end
Simple.run!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment