Created
November 22, 2010 18:38
-
-
Save emmapersky/710403 to your computer and use it in GitHub Desktop.
GDI Ruby. Class 3. Templating
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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