Skip to content

Commit e63cc24

Browse files
authored
Merge pull request #1928 from ember-learn/update-push-object-for-data-deprecation
Remove use of pushObject on RecordArray and ManyArray
2 parents 3b0d124 + 14a3655 commit e63cc24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guides/release/models/relationships.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ The second way of doing the same thing is to link the two records together by up
314314
```javascript
315315
let comment = this.store.createRecord('comment', {});
316316
let comments = await myBlogPost.comments;
317-
comments.pushObject(comment);
317+
comments.push(comment);
318318
comment.save().then(function() {
319319
myBlogPost.save();
320320
});
@@ -448,7 +448,7 @@ Alternatively, we could update the `hasMany` relationship by pushing a record in
448448
let blogPost = this.store.peekRecord('blog-post', 1);
449449
let comment = this.store.peekRecord('comment', 1);
450450
let comments = await blogPost.comments;
451-
comments.pushObject(comment);
451+
comments.push(comment);
452452
blogPost.save();
453453
```
454454

0 commit comments

Comments
 (0)