Skip to content

Using pagy_arel with a DISTINCT and a GROUP BY returning a weird pages number #477

Closed Answered by ddnexus
titanve asked this question in Q&A
Discussion options

You must be logged in to vote

I don't get what is wrong: from the screenshot: 137 pages means that you have 13 pages of 10 items (130 count so far) and the last page with 7 items, for a correct total count of 137, and a correct total number of pages of 14.

What should it be instead?

Or you mean that the count in your data should be 134 and not 137?

In that case you might want to pass the right count. See Custom count for custom scopes

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@titanve
Comment options

@titanve
Comment options

Answer selected by titanve
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@titanve
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants