abuiles / ember-cli-101-errata

18 stars 4 forks source link

model.rollback() deprecated #234

Open bambery opened 9 years ago

bambery commented 9 years ago

book version: 15-7-20 location: 1795

model.rollback() renamed to rollbackAttributes

release notes on deprecation/rename: http://emberjs.com/blog/2015/06/18/ember-data-1-13-released.html#sts=rollback

Also, I am wondering about why model.destroyRecord() is used for the new route, but rollbackAttributes() is used for edit. model.rollbackAttributes works fine in both cases, where the section of code in new will look like

  deactivate: function(){
    var model = this.modelFor('friends/new');
    model.rollbackAttributes();