Guest User

Untitled

a guest
Dec 16th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. require 'sinatra'
  2.  
  3. get '/' do
  4. <<-HTML
  5. 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>.
  6. HTML
  7. end
  8.  
  9. #get '/example_param/:name' do
  10. # "Your parameter is #{params[:name]}."
  11. #end
  12.  
  13. get '/example_block/:name' do |n|
  14. "Your block parameter is #{n}!"
  15. end
Add Comment
Please, Sign In to add comment