Closed RaphSfeir closed 7 years ago
Please see: https://hexdocs.pm/ja_resource/0.2.0/JaResource.Index.html#c:handle_index_query/2
You can define this in module and include via use
in your application if implementing it in each controller is too much.
I am currently using ja_serializer with scrivener for pagination on my lists (index) endpoints, everything is working smoothly, thanks for a great tool.
What would be a good way of using ja_resource without giving up my pagination feature, and at the same time not using boilerplate code for the pagination on every controller?
I was thinking of changing directly the
JaResource.Index
behavior, usingRepo.paginate
there, would it be a good approach or is it better to do this on my my app instead of theJaResource
dependency?