#92 ✓resolved
Elijah Miller

avoid doing count on last page

Reported by Elijah Miller | August 24th, 2007 @ 01:16 PM

I tried my hand at implementing this but the way options are parsed and shuffled around makes a bit tricky. Here's the gist:

When we get the result set, if the size of it is less than per_page, we're definitely on the last page. In that case total entries is equal to offset + size and we can safely skip the count.

This should be a improvementn on sites with many paginated areas that only have 1 page.

Comments and changes to this ticket

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Everyone's favorite Ruby library for pagination of practically anything!

People watching this ticket

Pages