Category: Ruby on Rails
Date: 2010-07-27 15:29

Rails will_paginate with acts_as_ferret

I wanted to use pagination in one of my Rails projects where I was also using the acts_as_ferret plugin. Now normally one would use


in the controller and in the view render with:

<%= will_paginate @collection %>

But with acts_as_ferret the controller will contain:

@collection=Model.find_with_ferret(params[:search], {:page=> params[:page], :per_page=>Model.per_page})

This is not a problem however. Acts_as_ferret is compatible with will_paginate. Your default will_paginate() helper will still be working.

  • Trackback(s)
ruby on rails model
Date: 1970-01-01 01:00
ruby on rails model

I love your style, the fact that your post is a little bit unlike others makes it so interesting, I get tired of seeing the same-old-same-old all of the time. This page is now in my stumbleupon bookmarks...

  • 0 Comment(s)

Your comment

Notify me when someone adds another comment to this post