Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'sinatra'
- get '/' do
- <<-HTML
- Hi. Check out the url param route <a href='/~irs221/sinatra/block_params/example_param/test'>Param = test </a> and then the block route <a href='/~irs221/sinatra/block_params/example_block/anothertest'>where block param is testing</a>.
- HTML
- end
- #get '/example_param/:name' do
- # "Your parameter is #{params[:name]}."
- #end
- get '/example_block/:name' do |n|
- "Your block parameter is #{n}!"
- end
Add Comment
Please, Sign In to add comment