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