title: rails Getting the parameter from the URL
body: <p>I have a rails application that I want to add attachments to assets, so I want to be able to call <a href="http://localhost:3000/attachments/:asset_id/new" rel="nofollow">http://localhost:3000/attachments/:asset_id/new</a> so that that it will automatically bring in the asset id.  I don't know how to configure this in views, though I think I did it once-upon-a-time.  So how could I accomplish this task?</p>
  
  <p>As far as I have got so far, and I believe this is correct is adding the following line to routes.rb:</p>
  
  <pre><code> match 'attachments/:asset_id/new'=&gt;'attachments#new'
  </code></pre>
  
  <p><strong>Note:</strong> This is a Rails 3 Application.</p>