Skip to content
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

Bug: undefined method `without_count' for #<Mongoid::Criteria:0x00000000065afa90> #10

Open
rgaufman opened this issue Apr 17, 2018 · 8 comments

Comments

@rgaufman
Copy link

The Kaminari readme provides this example:

User.page(3).without_count

However I'm getting the exception:

undefined method `without_count' for #<Mongoid::Criteria:0x00000000065afa90>

Any ideas?

@yuki24
Copy link
Member

yuki24 commented Apr 17, 2018

The without_count module is not implemented in the kaminari-mongoid gem. Any contribution is greatly appreciated.

@jclusso
Copy link

jclusso commented Jun 6, 2018

Has anyone implemented this? Would be a great addition!

@robertomurta
Copy link

Same here, for large datasets it's mandatory, or use mongoid estimated_count instead of count (to preserve the old behavior),

@jclusso
Copy link

jclusso commented Jul 14, 2021

@robertomurta not to shit on kaminari, but I'd checkout pagy. It has stuff for countless working.

@robertomurta
Copy link

Thanks @jclusso, I'll check it out.

@krishnarohitreddy
Copy link

@here Im trying to contribute but I get permission denied trying to create branch for PR.
My idea is simple use default false values for out_of_range? and last_page? methods and use if condition in UI while displaying link to next page.
Mongoid doesn't preload results so implementation has to be different than active record.

@amatsuda
Copy link
Member

@krishnarohitreddy Thank you for your interest.

I get permission denied trying to create branch for PR

Basically, you're not allowed to push your branch to a repo that you don't have write permission. Could you create your own fork, then send a PR from that fork? Thanks!

@krishnarohitreddy
Copy link

@amatsuda PR is now open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants