Question about passing pagination data when using pagy #356
-
Hello, thanks a lot for this gem! I'm confused about how to pass pagination data to my resource and expose it in the response. I tried this old issue as I'm also using pagy, but that didn't work.
What was mentioned in the old issue is:
Any helpful hints on what to do? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Is there a unique or different way on how
And I have this in the serializer;
But that didn't work. |
Beta Was this translation helpful? Give feedback.
-
I "think" I figured it out - looks like
Then in my serializer;
Let me know if there is a better way for this. |
Beta Was this translation helpful? Give feedback.
@kinsomicrote I think your solution is appropriate for now.
It might be a good idea to create a new API to configure pagination though. It might look like below:
This could be more direct and clearer way to configure pagination.