Skip to content

Instantly share code, notes, and snippets.

@rjnienaber
Created July 30, 2013 09:18
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 rjnienaber/6111500 to your computer and use it in GitHub Desktop.
Save rjnienaber/6111500 to your computer and use it in GitHub Desktop.
require 'sinatra'
before do
puts "PARAMS: #{params.inspect}" #PARAMS: {}
end
get '/hi/:greeting' do
puts "PARAMS: #{params.inspect}" #PARAMS: {"splat"=>[], "captures"=>["Hello"], "greeting"=>"Hello"}
"#{params[:greeting]} World!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment