From 6b2fc385b580eabf432316953a45afcbab19b6bf Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Thu, 10 Sep 2015 22:02:55 +0800 Subject: [PATCH] [DOC beta] Update Object Root docs re: plurals - 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 --- packages/ember-data/lib/adapters/rest-adapter.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/ember-data/lib/adapters/rest-adapter.js b/packages/ember-data/lib/adapters/rest-adapter.js index 2870d6e6f48..6f7b97d4e05 100644 --- a/packages/ember-data/lib/adapters/rest-adapter.js +++ b/packages/ember-data/lib/adapters/rest-adapter.js @@ -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