Tag Archives: will_paginate

Paginate arrays with will_paginate

There may come a time when you wish to paginate an ordinary array of objects, as opposed to an ActiveRecord collection. Thankfully will_paginate supports this out of the box, with very little work.

Firstly, you will need to include the will_paginate array library, which comes with will_paginate. To do this either create or add to an existing initializer in config/initializers/. With all projects I tend to create a file named project_library.rb. Continue reading