title: More-efficient way to pass the Rails params hash to named route
body: <p>I need a more-efficient way to pass the params hash to a named route, including the ability to add/remove/modify a key/value pair.</p>
  
  <p>Adding a key (the :company symbol), while preserving the remainder of the params hash (manually specify each symbol/value):</p>
  
  <pre><code># adds the company filter
  link_to_unless params[:company]==company, company, jobs_path(:company=&gt;company, :posted=&gt;params[:posted],:sort=&gt;params[:sort],:dir=&gt;params[:dir])
  </code></pre>
  
  <p>Removing a key (eliminates the :company symbol), while preserving the remainder of the params hash (manually specify each symbol/value):</p>
  
  <pre><code># create a link that removes the company filter
  link_to_unless_current 'x', jobs_path(:posted=&gt;params[:posted],:sort=&gt;params[:sort],:dir=&gt;params[:dir])
  </code></pre>
  
  <p>I thought of just passing the params hash directly, but that throws an exception:</p>
  
  <pre><code>link_to_unless params[:company]==company, company, jobs_path( params )
  </code></pre>
  
  <p>I'm hoping for some DRYer alternatives.</p>