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 with numeration of pages in pagination #57

Closed
Zhomart opened this issue Sep 30, 2013 · 0 comments
Closed

Bug with numeration of pages in pagination #57

Zhomart opened this issue Sep 30, 2013 · 0 comments

Comments

@Zhomart
Copy link
Contributor

Zhomart commented Sep 30, 2013

Paginator on index page shows incorrect numeration.

This bug comes from Mongoid#Criteria's count.

User.criteria.limit(1).count returns number of all users.
To make it return 1, we should pass argument true to method count.
User.criteria.limit(1).count(true) returns 1

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

1 participant