I'm building a web app using Ember 1.5 and I use Ember Model 0.0.11 to link the app to an API. I'm currently having trouble getting Ember Model to use nested API endpoints.
For instance, my app has a User
model, which has a hasMany
relationship with a Post
model. Now, when I want to load the posts for a certain user, I'd like the Post.findQuery('user_id', {user_id});
method to access the GET /users/{user_id}/posts
endpoint. Instead, it seems that the Ember Model solution prefers to send the query as a parameter to the GET /posts
endpoint.
Ember Model's RESTAdapter
does allow for easy customization, but before I start coding a completely custom RESTAdapter
I'd love to know if someone has already done this and how they solved the problem.