Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Page Count Can Be wrong

#83

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.

Reported by David Richards · August 16th, 2007 @ 08:56 PM

State: resolved
Milestone: none
Assigned to: Mislav Mislav

Activity

  1. Chris Wanstrath
    Chris Wanstrath
    • State changed from new to open
    • Assigned user changed from Chris Wanstrath to Mislav

    August 16th, 2007 @ 08:56 PM

  2. David Richards
    David Richards

    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.

    August 18th, 2007 @ 07:35 PM

  3. Chris Wanstrath
    Chris Wanstrath
    • 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]

    http://plugins.require.errtheblo...

    August 18th, 2007 @ 09:03 PM

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.