Skip to content

Commit

Permalink
replace not existing removeObject method
Browse files Browse the repository at this point in the history
  • Loading branch information
wozny1989 authored Jun 25, 2024
1 parent 1e01b08 commit 41a4e1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guides/release/models/relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,9 @@ It is also possible to remove a record from a `hasMany` relationship:

```javascript
let blogPost = this.store.peekRecord('blog-post', 1);
let comment = this.store.peekRecord('comment', 1);
let commentToRemove = this.store.peekRecord('comment', 1);
let comments = await blogPost.comments;
comments.removeObject(comment);
blockPost.comments = comments.filter((comment) => comment !== commentToRemove);
blogPost.save();
```

Expand Down

0 comments on commit 41a4e1c

Please sign in to comment.