Skip to content

Commit

Permalink
Rename rollback() to rollbackAttributes()
Browse files Browse the repository at this point in the history
Ember Data renamed Model.rollback() to Model.rollbackAttributes().
(emberjs/data#3305)
  • Loading branch information
mikzar committed Sep 25, 2015
1 parent ebaf4ed commit cd046be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/models/creating-updating-and-deleting-records.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ person.changedAttributes(); //=> { isAdmin: [false, true] }
```

At this point, you can either persist your changes via `save()` or you
can rollback your changes. Calling `rollback()` reverts all the
can rollback your changes. Calling `rollbackAttributes()` reverts all the
`changedAttributes` to their original value.

```js
person.get('isDirty'); //=> true
person.changedAttributes(); //=> { isAdmin: [false, true] }

person.rollback();
person.rollbackAttributes();

person.get('isDirty'); //=> false
person.get('isAdmin'); //=> false
Expand Down

0 comments on commit cd046be

Please sign in to comment.