#128 ✓resolved
ckknight

Array#paginate is inconsistent with collection#paginate

Reported by ckknight | October 10th, 2007 @ 11:40 PM

Currently, Array#paginate's API is in the form of

[1,2,3].paginate(page=1, per_page=15)

whereas Rails' collections use the form

myCollection.paginate(:page => 1, :per_page => 30, :total_entries => num)

Now there's multiple issues with this:

1) using a tuple of options instead hash-style options

2) different per_page

3) Depending on the environment (e.g. test vs. development), one method can return an Array while in test or a collection in development.

I've attached a diff of what I think should allay this issue.

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

Attachments

Pages