Skip to content

Commit

Permalink
[DOC beta] Update Object Root docs re: plurals
Browse files Browse the repository at this point in the history
- Pluralizing object roots is not explicitly required.
- Clarified that Ember Data will match on ID even if there's more than one result in a response to findRecord
  • Loading branch information
elithrar committed Sep 10, 2015
1 parent 61d7f42 commit 6b2fc38
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/ember-data/lib/adapters/rest-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ import BuildURLMixin from "ember-data/adapters/build-url-mixin";
}
```
Note that the object root can be pluralized for both a single-object response
and an array response: the REST adapter is not strict on this. Further, if the
HTTP server responds to a `GET` request to `/posts/1` (e.g. the response to a
`findRecord` query) with more than one object in the array, Ember Data will
only display the object with the matching ID.
### Conventional Names
Attribute names in your JSON payload should be the camelCased versions of
Expand Down

0 comments on commit 6b2fc38

Please sign in to comment.