Reputation: 1266
I don't know when it's happened, but recently my client noticed strange output in will_paginate's pager. Following fragment of generated views shows unexpected:
{"tag"=""
in tags properties and very unsightly debug information.
<div class="pagination" {"tag"="">
"Black & White", "action"=>"index", "controller"=>"photos"}="{:order=>nil}">
<span class="previous_page disabled">← Previous</span>
<em class="current">1</em>
<a href="/photos?page=2&tag=Black+%26+White" rel="next">2</a>
<a class="next_page" href="/photos?page=2&tag=Black+%26+White" rel="next">Next →</a>
</div>
my view has following
= will_paginate @photos, params=>{:order=>params['order']}
I use Ruby ruby 1.9.3, Rails 3.2.16 and haml 4.0.2
I have no idea how to fix this problem.
Upvotes: 0
Views: 75
Reputation: 4417
Perhaps it is doing something weird with params
because you've passed in the variable. I think what you meant to do was this:
= will_paginate @photos, :params => {:order=>params['order']}
Upvotes: 4