Skip to content

Instantly share code, notes, and snippets.

@nanodeath
Created January 23, 2010 19:35
Show Gist options
  • Save nanodeath/284756 to your computer and use it in GitHub Desktop.
Save nanodeath/284756 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
require 'haml'
get '/my_template' do
@weather = "sunny"
@temperature = 80
haml :weather
end
/ In the "views/" subdirectory
%h1 The Weather
%p== It appears to be quite #{@weather}
%h2 Temperature
%p= @temperature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment