Forum: Ruby on Rails Pagination on arrays

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
The U. (Guest)
on 2008-12-11 19:25
I'm looking for a way to paginate an array of data basically. I know
about will_paginate but from what I've seen that only works on
activerecord searches. I can't seem to find a good resource that lets
you paginate a regular data set. Anyone got a tip on this? I'd really
appreciate it :)
Frederick C. (Guest)
on 2008-12-11 20:09
(Received via mailing list)
will_paginate does work on arrays. You need to create an instance of
WillPaginate::Collection targetting your array. I think there's an
example in the dogs

Sent from my iPhone

On 11 Dec 2008, at 17:25, Mark Mr <removed_email_address@domain.invalid>
Danny B. (Guest)
on 2008-12-12 00:42
> I think there's an example in the dogs
> Sent from my iPhone

LOVE that iPhone spell checker
The U. (Guest)
on 2008-12-12 17:31
lol well his spell-checked wouldn't have picked up "dogs" obviously. I
couldn't  find an example in the help docs but I figured out how to do
it, which was actually really easy.

@x.paginate(:per_page => 10)

This topic is locked and can not be replied to.