January 5, 2013
Using will_paginate with Arrays
I really like [will_paginate][1] for Ruby on Rails because it’s easy to setup and the intent of pagination is communicated well.
The only thing that bothers me is that it can be used with ActiveRecord only. My blog runs on Rails without ActiveRecord and all posts are kept in a git repository as simple markdown files. So I needed to write a wrapper that returns a WillPaginate::Collection and works on Arrays.
Read more