title: Accessing params hash from a partial in Rails
body: <p>In a standard view in Rails, you can access the <code>params</code> hash as if you were in a controller, but I can't get this to work within a partial.</p>
  
  <blockquote>
    <p>undefined method `parameters' for nil:NilClass</p>
  </blockquote>
  
  <p>I could pass the params to the partial using the <code>locals</code> option, but this partial is used a lot and I thought there must be a better way of doing it.</p>
  
  <p>Anything that tries to access params will cause it to fail:</p>
  
  <pre><code>&lt;% params %&gt;
  </code></pre>
  
  <p>I've noticed that I only get the error when accessing from some views. On other view it works fine.</p>