defunkt/jquery-pjax — Issue #104: & symbol appended at the end of the links (browser bar)
Author: maxaudet
Created: 2012-03-07 16:16:58+00:00
State: open

Using pjax works but there is always an extra "&" at the end of the URL shown in browser bar even if my link doesn't have it. This breaks my link_to_unless ...

If I remove
$('.navbar a').pjax('[data-pjax-container]')
from my .js.coffee file, the & goes away.

Example link I use in my application navbar
<%= link_to_unless(params[:category].to_s == "Application", "Application", {:controller => "top10", :action => "index", :category => "Application"}) %>

In Chrome 17, when I hover this link, it shows
http://localhost:3000/top10?category=Application
but when I click it, the current URL in the top Chrome bar is
http://localhost:3000/top10?category=Application&

Any idea ?
Thanks