require "rubygems" require "sinatra" use_in_file_templates! get "/" do erb :home end get "/go" do erb :go end get "/redirect" do redirect "/" end post "/go" do @user = params[:name] @email = params[:email] erb :hello end __END__ @@ layout
visit there
@@ go @@ helloHello, <%= @user %>
Your email is: <%= @email %>