title: Rails UJS with URL params issue
body: <p>I have a basic working rails app where I rely a lot on URL params for displaying or not logic.
  I was able to ajaxify it using UJS and link_to remote => true but when I click these links, the shown URL isn't updated (which makes sense) and other partials can't read the URL params</p>
  
  <p>For example, in <code>index.html.erb</code> (before UJS so you can see how it works),</p>
  
  <pre><code>&lt;div class="container-fluid"&gt;
    &lt;% if params[:category] %&gt;&lt;div class="row-fluid span6"&gt;
      &lt;div class="span6"&gt;
        &lt;%= render :partial =&gt; "buglist" %&gt;
      &lt;/div&gt;
    &lt;% end %&gt;
  
    &lt;% if params[:id] %&gt;
      &lt;div class="span6"&gt;
        &lt;%= render :partial =&gt; "bugdetails" %&gt;
      &lt;/div&gt;
    &lt;% end %&gt;
  
    &lt;% unless params[:category] or params[:id]%&gt;
      &lt;%= render :partial =&gt; "landingpage" %&gt;
    &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <ol>
  <li><p>My navbar has link_to for multiple :category, like this</p>
  
   "top10", :action => "index", :category => catname) %></li>
  <li><p>If there is a params[:category] in the URL, I display a list on the left and when I click an ID in this list, it'll display the right DIV with </p></li>
  <li><p>If there is no params, it'll render what I call the landing page (some kind of homepage)</p></li>
  </ol>
  
  <p>This works good now but if I add remote => true to my navbar links, it'll work for the left div but the #3 (landing page) will always display because for some reason it won't see the URL params.  Also, since the shown URL is always the same, all my link_to_unless(params...) won't work.</p>
  
  <p>With USJ:</p>
  
  <p>index.html.erb</p>
  
  <pre><code>&lt;div class="row-fluid span6" id="buglist"&gt;&lt;/div&gt;
  &lt;div class="row-fluid span6" id="bugdetails"&gt;&lt;/div&gt;
  &lt;div class="row-fluid id="landingpage"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>index.js.erb</p>
  
  <pre><code>&lt;% if params[:category] %&gt;
    $("#buglist").html("&lt;%= escape_javascript(render(:partial =&gt; 'buglist')) %&gt;");
  &lt;% end %&gt;
  
  &lt;% if params[:id] %&gt;
    $("#bugdetails").html("&lt;%= escape_javascript(render(:partial =&gt; 'bugdetails')) %&gt;");
  &lt;% end %&gt;
  
  &lt;% unless params[:category] or params[:id]%&gt;
    $("#landingpage").html("&lt;%= escape_javascript(render(:partial =&gt; 'landingpage')) %&gt;");
  &lt;% end %&gt;
  </code></pre>