1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00
sinatra/examples/hello/test.rb
blake.mizerany@gmail.com 72be291da2 this is it
2007-09-08 23:51:24 +00:00

20 lines
313 B
Ruby

$LOAD_PATH.unshift '../../lib/'
require 'sinatra'
get '/' do
body <<-HTML
<form method="POST"><input type="text" name="name"/><input type="submit"></form>
HTML
end
post '/' do
body "You entered #{params[:name]}"
end
get '/erb' do
erb :index
end
get '/test' do
erb "Hello <%= params[:name] %>"
end