# Will\_paginate creating links for all in a ferret search

**URL:** <https://www.ruby-forum.com/t/will-paginate-creating-links-for-all-in-a-ferret-search/187123>\
**Category:** Ferret\
**Created:** [April 17, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/will-paginate-creating-links-for-all-in-a-ferret-search/187123 "2010-04-17T16:35:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mydarkpassenger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/82dd89/32.png) [@mydarkpassenger](https://www.ruby-forum.com/u/mydarkpassenger)\
**Post date:** [April 17, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/will-paginate-creating-links-for-all-in-a-ferret-search/187123/1 "2010-04-17T16:35:09Z")

</div>

When I use act\_as\_ferret with will\_paginate the first page of results  
creates links for all items instead of the filtered result. On other  
pages it works correctly. For example:

#controller  
@users = User.paginate User.find\_with\_ferret(‘name:g\*’), :page =\>  
params[:page] ||= 1, :per\_page =\> 2

#view  
\<%= will\_paginate @users %\>  
\<% for user in @users %\>  
\<%=debug(user.name)%\>  
\<% end %\>

\<%=“Page Count: #{@users.total\_entries}”%\>

When on page 1 I get 7 results (which is all the items in the index)  
instead of 3 which is the result count. When on page 2 or more it works  
right showing 3 for total\_entries. When I go back to 1 it shows 7  
results again. Is there to correct this?
