# will\_paginate

**URL:** <https://discuss.rubyonrails.org/t/will-paginate/26829>\
**Category:** rubyonrails-talk\
**Created:** [March 25, 2008, 2:03pm UTC](https://discuss.rubyonrails.org/t/will-paginate/26829 "2008-03-25T14:03:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [March 25, 2008, 2:03pm UTC](https://discuss.rubyonrails.org/t/will-paginate/26829/1 "2008-03-25T14:03:58Z")

</div>

hi at all I installed the plugin will\_paginate successfully and now I'll use it. But I've a problem. I wrote a method search and this method return an array of products. The search method is special and not an easy find query. So I can use the :conditions of the will\_paginate plugin. But I will paginate the array of products.

So how I can use the will\_paginate plugin to group the products (:per\_page =\> 5 products).

thanks for helping...

---

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [March 25, 2008, 9:09pm UTC](https://discuss.rubyonrails.org/t/will-paginate/26829/2 "2008-03-25T21:09:36Z")

</div>

But I've the problem, that I use acts\_as\_ferret for fulltext search. So I can't use the :conditions statement in the paginate method. Because I have for example a query like 'search ruby'. So i want to find records for 'search ruby', 'search' and 'ruby'. So I call the find\_by\_content method from ferret three times. So I think, the paginate method is impractical, because I have the total\_hits as recently as after the three method calls.

Jesus bernardo Ruiz flores wrote:[http://www.ruby-forum.com/topic/147149?reply\_to=650959#postform](http://www.ruby-forum.com/topic/147149?reply_to=650959#postform) will\_paginate - Ruby Forum
