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

Fix total_count on loaded relation #932

Merged
merged 1 commit into from Dec 21, 2017
Merged

Conversation

tumayun
Copy link
Contributor

@tumayun tumayun commented Nov 29, 2017

Fix total_count on loaded relation

before:

[1] pry(main)> User.count
=> 107
[2] pry(main)> User.max_per_page
=> 25
[3] pry(main)> User.page(1).per(100).load.total_count
=> 25
[4] pry(main)> User.page(2).per(100).load.total_count
=> 125

after:

[1] pry(main)> User.count
=> 107
[2] pry(main)> User.max_per_page
=> 25
[3] pry(main)> User.page(1).per(100).load.total_count
=> 107
[4] pry(main)> User.page(2).per(100).load.total_count
=> 107

@yuki24 yuki24 self-assigned this Nov 29, 2017
@yuki24 yuki24 added this to the 1.1.2 milestone Nov 29, 2017
@yuki24 yuki24 merged commit 4ada38c into kaminari:master Dec 21, 2017
@yuki24
Copy link
Member

yuki24 commented Dec 21, 2017

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants