Guest User

Untitled

a guest
Jan 31st, 2014
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.20 KB | None | 0 0
  1. require 'sinatra'
  2. get '/' do
  3.     "<a href=\"/h/Alex\">Press here!</a>"
  4. end
  5. get '/ty/:name' do
  6.     "Thank you, #{params[:name]}"
  7. end
  8. get '/h/:name' do |n|
  9.     # hello world with user-frienly url
  10.     "Hello #{n}!"
  11. end
Advertisement
Add Comment
Please, Sign In to add comment