1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

this is it

This commit is contained in:
blake.mizerany@gmail.com 2007-09-08 23:51:24 +00:00
commit 72be291da2
17 changed files with 477 additions and 0 deletions

20
examples/hello/test.rb Normal file
View file

@ -0,0 +1,20 @@
$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

View file

@ -0,0 +1 @@
<%= 1 + 3 %>