开发者

Will_paginate page links have just disappeared in Rails 2.3.8

开发者 https://www.devze.com 2023-03-30 19:40 出处:网络
I am using version 2.3.11 of will_paginate, been using this gem for years. Suddenly, the page links have disappeared! There is no error message either.

I am using version 2.3.11 of will_paginate, been using this gem for years. Suddenly, the page links have disappeared! There is no error message either.

I have vendored this gem. I put a debug statement in the "view_helpers.rb" file in the vendored gem, and sure enough, it is getting called correctly from the view. I have also verified that my collection object is a WillPaginate::Collection object.

Please note that the WillPaginate::Collection object is returning "3" with the total_entries method, when there are in fact 565 of the AR object in the database. And I'm doing a blank find against it. So something is going wrong.

So I would guess that because the total_entries is only 3, the page links are not showing up because it thinks there is o开发者_StackOverflow中文版nly one page. I just wonder why it doesn't pick up the right number.


A simple gem upgrade to 2.3.16 took care of this.

0

精彩评论

暂无评论...
验证码 换一张
取 消