Skip to content

Commit 29503a6

Browse files
committed
Update guides to suggest include to ba an array
1 parent e873e45 commit 29503a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

guides/release/models/relationships.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ with the post as well.
358358
The [JSON:API specification allows](http://jsonapi.org/format/#fetching-includes)
359359
servers to accept a query parameter with the key `include` as a request to
360360
include those related records in the response returned to the client.
361-
The value of the parameter should be a comma-separated list of names of the
361+
The value of the parameter should be an array of names of the
362362
relationships required.
363363

364364
If you are using an adapter that supports JSON:API, such as Ember's default [`JSONAPIAdapter`](https://api.emberjs.com/ember-data/release/classes/JSONAPIAdapter),
@@ -380,7 +380,7 @@ export default class PostRoute extends Route {
380380
@service store;
381381
model(params) {
382382
return this.store.findRecord('post', params.post_id, {
383-
include: 'comments'
383+
include: ['comments']
384384
});
385385
}
386386
}
@@ -400,7 +400,7 @@ export default class PostRoute extends Route {
400400
@service store;
401401
model(params) {
402402
return this.store.findRecord('post', params.post_id, {
403-
include: 'comments,comments.author'
403+
include: ['comments', 'comments.author']
404404
});
405405
}
406406
}
@@ -422,7 +422,7 @@ export default class AdeleRoute extends Route {
422422
return this.store
423423
.query('artist', {
424424
filter: { name: 'Adele' },
425-
include: 'albums'
425+
include: ['albums']
426426
})
427427
.then(function(artists) {
428428
return artists[0];

0 commit comments

Comments
 (0)