will_paginate doubles the number of pages that are actually there.
-
Mislav
- State changed from new to invalid
If you don't will_paginate to count your records, simply use the "total_entries" option. The value should be an integer and its presence makes the paginating finders skip the counting logic.
Total page number is then being calculated like this:
@total_pages = (@total_entries / @per_page.to_f).ceil -
Chris Wanstrath
This may or may not be fixed with changeset 258. Update the plugin and try again.
-
Wayne Seguin
It turns out that passing:
:count => { :select => "distinct o.id" }
fixed the issue for us.
Thanks for the response!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.