Page Count Can Be wrong
Reported by David Richards | August 16th, 2007 @ 08:56 PM
Page count WILL be wrong if you are using a dynamic finder AND CONDITIONS. You even tho the sql will work fine and your result set will be what you wanted, the page count will be based on the conditions without the limitations of the dynamic finder. So you will end up with extra pages that will get you no results.
Comments and changes to this ticket
-
Chris Wanstrath August 16th, 2007 @ 08:56 PM
- State changed from new to open
- Assigned user changed from Chris Wanstrath to Mislav
-
David Richards August 18th, 2007 @ 07:35 PM
I'm really interested in seeing how this gets fixed, I looked thru the code for over an hour and I could not find out exactly what needed to happen, I got close and got it to error in a new way but I could not fix it. I changed my application that uses will_pagingate to use :conditions only and not in combination with dynamic finders. I wonder also if there is an issue combining :conditions / dynamic finders with single table inheritance.
-
Chris Wanstrath August 18th, 2007 @ 09:03 PM
- State changed from open to resolved
(from [328]) Will Paginate: fix count queries when conditions are used in combination with dynamic finders. Thanks, David Richards. [#83 state:resolved]
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.
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!