Skip to content

Instantly share code, notes, and snippets.

@emmapersky
Created November 22, 2010 18:38
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 emmapersky/710403 to your computer and use it in GitHub Desktop.
Save emmapersky/710403 to your computer and use it in GitHub Desktop.
GDI Ruby. Class 3. Templating
require 'rubygems'
require 'sinatra'
get '/say_hello/:name' do
@name = params[:name]
erb :say_hello
end
__END__
@@ say_hello
<html>
<head>
<title>Say Hello!</title>
</head>
<body>
<h1>Hello <%= @name %></h1>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment