#244 ✓resolved
Ken-ichi Ueda

:from broken in will_paginate

Reported by Ken-ichi Ueda | September 17th, 2008 @ 01:14 AM



User.paginate(:all, :from => 'users', :page => 1)

yields this error:


ArgumentError: Unknown key(s): from

This works:


User.find(:all, :from => 'users')

This example is silly, but I use the :from param to force the use of indexes, which is not so silly. Am I missing something, or is this a bug?

Comments and changes to this ticket

  • Mislav

    Mislav October 7th, 2008 @ 10:26 AM

    • Assigned user changed from “Chris Wanstrath” to “Mislav”
    • State changed from “new” to “invalid”

    You must be missing something. will_paginate ignores and forwards every parameter that it doesn't recognize, like :from.

    Your example works in will_paginate and in commit 39e77cf I've added a test to prove it.

  • Mislav

    Mislav October 7th, 2008 @ 11:34 AM

    • State changed from “invalid” to “resolved”

    Ah, now I see that this fails on Rails versions before 2.1 because find() supports :from, but count() doesn't.

    Fixed in 1449867

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!

Pages