will_paginate and Merb

Mislav & Pjhyett‘s will_paginate plugin has been a reference in the Rails world for a little while now. The need for Pagination is arguable, but that’s not the point of this post.

There are few existing pagination solutions for Merb, but people moving from Rails and porting a Rails app will be happy to hear that will_paginate is now Merb compatible (DataMapper and ActiveRecord supported).

Mislav worked hard making sure that his next release will be framework agnostic and hopes to support both Rails 2.2 and Merb 1.0. You can see where is at by checking on his agnostic branch.

I did some work over the week end to make sure I could use will_paginate in one of my project. You can see my work there. I also built a temp gem for you to test WP with Merb until mislav releases the final version of the gem (especially if you are lazy and don’t want to deal with git).

Similar Posts


  1. #1 by highandwild - October 27th, 2008 at 08:06


    Is it just me or, using your gem, does not output anything, nor are any errors raised.

    I’m using it with thinking_sphinx, and I have passed the per_page, and :page variables (page is nil)


  2. #2 by highandwild - October 27th, 2008 at 08:08

    sigh the blog ate up: <% =will_paginate(@results) >

    Sorry for the multiple comments

  3. #3 by kako - October 31st, 2008 at 22:31

    could you expand on “The need for Pagination is arguable” I hate pagination so if I could get a good reason not to use it I’d be interested.

  4. #4 by nachokb - November 13th, 2008 at 15:44

    Try Searchlogic (previously named Searchgasm) by Binary Logic. It integrates pagination, ordering and filtering and simply rocks.

    Right now it supports only Rails, but as the guy has already ported another plugin to Merb he may eventually port it too. Furthermore, the ActionPack stuff is fairly agnostic already. Don’t know how difficult would supporting Datamapper be…

    – nachokb

Comments are closed.