Forum: Ferret Will_paginate creating links for all in a ferret search

5a8cf85f482967a487d7800ccd973a2d?d=identicon&s=25 Gene Anthony (mydarkpassenger)
on 2010-04-17 16:35
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?
This topic is locked and can not be replied to.