davidcelis/api-pagination — pull request #13 by mattvanhorn (2014-06-16 22:40:36+00:00)
Title: Enable options for paginate_with and allow custom serializers

Hey David,
I made these changes so I could get this to work with something I'm doing using the Oat gem (https://github.com/ismasan/oat) emitting JSON-API.

example of use here: https://gist.github.com/mattvanhorn/73326e5ec984f123f2b0

In that example, a CampaignsSerializer instance responds to #to_json, and outputs a JSON-API formatted body. But it does not respond to the paginator methods very easily. I tried a lot of approaches to allow this, and I like this one more than the others, (for example, injecting a serializer.)

What do you think?