Skip to content

Instantly share code, notes, and snippets.

@dtolj
Created June 7, 2011 20:29
Show Gist options
  • Save dtolj/1013082 to your computer and use it in GitHub Desktop.
Save dtolj/1013082 to your computer and use it in GitHub Desktop.
sinatra haml
require 'rubygems'
require 'sinatra'
require 'haml'
before do
# Strip the last / from the path
request.env['PATH_INFO'].gsub!(/\/$/, '')
end
get '' do
haml :index
end
get '/about' do
haml :about
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment