title: Passing parameters to erb view
body: <p>I'm trying to pass parameters to an erb view using Ruby and Sinatra.</p>
  
  <p>For example, I can do:</p>
  
  <pre><code>get '/hello/:name' do
    "Hello #{params[:name]}!"
  end
  </code></pre>
  
  <p>How do I pass <code>:name</code> to the view?</p>
  
  <pre><code>get '/hello/:name' do
    erb :hello
  end
  </code></pre>
  
  <p>And how do I read the parameters inside view/hello.erb?</p>
  
  <p>Thanks!</p>