-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kaminari not paging my records #50
Comments
This is due to |
alexistoulotte; Yeah I found other tickets with the same issue, for now I'm using the .all.count workaround and is working. Thanks |
IMHO |
No, that is not true. |
@alexistoulotte after calling .page(x) and .all.count, there is no other sql query, but my variable gets the expected objects from .page call. I would like that only calling .page(x) could be enough to get my objects, but right now this allow me to use kaminari. |
OK, after a Note that the issue is due to scopes created by kaminari and
You may figure that the solution is to invoke
A workaround for kaminari is to dynamically override WDYT? |
Yes, I understand that AR So, I suppose that would be improved sooner or later. The best solution I found so far is this patch rails/rails#201 Thanks! |
OK, cool :) Will monkey patch for the moment until next rails release. Thanks! |
Experiencing the same issue. I am doing:
Instead of:
Which seems to work for now. Please keep me posted as to when an official patch is realeased |
I'm having problems with this. Kaminari is only showing the first page of results for me, "SELECT COUNT(*) FROM |
This is actually already fixed in edge Rails Let's see how this works... |
Hi;
Inside of my index action I have something like
@shipments = Shipment.order('date desc').page(params[:page])
If page is null, not passing the parameter or page == 1 then I got results and my @shipments variable get loaded, but if page >= 2 I got nothing, actually looking at Rails log no query is being issue.
My shipments table have hundred of records.
If I try the exact same line of code in Rails console it works, it issue the query
I'm using version 0.10.4 of kaminari.
Do you have any suggest on how to fix this?
The text was updated successfully, but these errors were encountered: