title: rails params.merge in link_to
body: <p>I am trying to add a URL parameter in a link_to block.</p>
  
  <p>The code currently <code>&lt;%= link_to "Submit", :action =&gt; 'renderChart', :class =&gt; "btn", :remote =&gt; true, :params =&gt; params.merge(:limit =&gt; 5) %&gt;
  </code></p>
  
  <p>but this gives me an error.</p>
  
  <p>It adds the :class and :action into the url parameter, not just the :limit. Why?</p>
  
  <p>EDIT:</p>
  
  <p>I add other URL params from another link that looks like this</p>
  
  <pre><code>link_to "Toggle Sort Direction",:action =&gt; 'renderChart', :remote =&gt; true, :params =&gt; {:sort =&gt; "desc"}
  </code></pre>
  
  <p>so when the user clicks the other link I want to add the limit to the url params and keep the sort params</p>