paginate on an association loads the entire association before doing a count
Reported by Elijah Miller | August 24th, 2007 @ 11:52 AM
It would appear the scoper area of wp_count! in finder.rb is causing the association to be completely loaded before doing any pagination on it. Line 122 of finder.rb calls respond_to? which in turn seems to be doing the loading of all objects.
Changeset 326 is the culprit.
Comments and changes to this ticket
-
Chris Wanstrath August 24th, 2007 @ 06:11 PM
- State changed from new to open
That's my fault, I'll investigate.
-
Chris Wanstrath September 28th, 2007 @ 09:30 PM
- State changed from open to resolved
Mislav fixed this.
-
Mislav July 27th, 2011 @ 10:50 AM
- Tag set to will_paginate
- Assigned user changed from Chris Wanstrath to Mislav
- Milestone order changed from 0 to 0
(from [ca42e3c7dec04bc596eb9c035a72f101bb2a169f]) add spec for paginated_section for a single page
Fixes #90
https://github.com/mislav/will_paginate/commit/ca42e3c7dec04bc596eb...
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!