RailsCasts Pro episodes are now free!

Learn more or hide this

maxaudet's Profile

GitHub User: maxaudet

Comments by

Avatar

I added rack-pjax and it 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

Avatar

Found it and can't delete my post. Sorry
I used this - "value: "%02d" % (index+1).to_s"

Avatar

What would be the best way to store the position with double digits ; set 01 instead of 1, 02 instead of 2 and so on until 10.

Thanks for another great one Ryan!

Avatar

How did you fix it ? I have the exact same problem.
Thanks