vendredi 17 mars 2017

Adapter used with embedded links in Ember

I've been scratching my head on this issue with my ember-data (v2.10.0) adapter not working in the way I expect. I have a model called called say.. posts. The post model is using the default RESTSerializer and has a links attribute in its payload that defines a comments relationship (a has-many relationship between posts and comments). The comments resource is loaded asynchronously at a nested path under posts at api/posts/:post_id/comments on the server. My question is, where does the ember-data adapter for comments live? I have attempted creating a top-level comment adapter, but that seems to do nothing. Am I missing something? Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire