Should I use Ember Data for custom AJAX calls like "get the latest"?

I use Ember Data for all the standard operations like findRecord, findAll, etc, but what about for custom endpoints outside of the standard stuff, like: /posts/latest. For this small example, it probably would make more sense to use findAll() and sort on the client. In my other scenario however, it isn’t so simple so the work is being done on the server. What is the best way to handle this?


How about using query, something like /api/model?filter=latest.

1 Like

ya that is probably the best choice. And in the query method of the adapter, I can do some trickery to change the endpoint to /latest. thanks!

Check out ember-api-actions to see if it meets your need