Currently I'm working on app using Rails (4.1.0) API and Ember (2.1.0) and I'm having hard time making pagination in Ember side works.
Rails API JSON output includes automatically made pagination links (from combination of JSON API adapter in AMS and Kaminari pagination) like this:
"links": {
"self": "http://example.com/articles?page[number]=3&page[size]=1",
"first": "http://example.com/articles?page[number]=1&page[size]=1",
"prev": "http://example.com/articles?page[number]=2&page[size]=1",
"next": "http://example.com/articles?page[number]=4&page[size]=1",
"last": "http://example.com/articles?page[number]=13&page[size]=1"
}
Could anyone give me a hint how to get to those values in Ember-Data, in order to use them in Ember template? Has anybody found a temporary workaround for this problem (as Ember is probably going to be fully JSON API compatible one day)?
Every bit of help will be very appreciated ;)
Reference to combination of JSON API adapter in AMS and Kaminari pagination: https://github.com/rails-api/active_model_serializers/blob/master/docs/howto/add_pagination_links.md
Edit:
After making some progress in this matter I think it would be better now to ask:
How to pass hash like page: { number: x, size: y }
in params in request to Rails API from Ember?