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?
on 2010-04-17 16:35
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.