Skip to content

Instantly share code, notes, and snippets.

@pathsny
Created April 24, 2010 13:15
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 pathsny/377644 to your computer and use it in GitHub Desktop.
Save pathsny/377644 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
require 'builder'
get '/hi' do
builder do |html|
html.h1 "Frist Post"
html.form("action" => "boo", "method" => "post") do
html.input("type" => "submit", "id" => "submit")
end
end
end
post '/boo' do
redirect "http://#{request.host_with_port}/bar"
end
get '/bar' do
"getted"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment