How to make changes to a record using ember-data-1.0.0-beta6

With ember data 0.0.14, transactions can be simple .rollback(). But now the transaction is gone. Also, any details about how to undo the recording modifications are gone: we only have information on how to save the recordings.

How can I undo the changes?

+3
source share
2 answers

Transactions have disappeared, but you can still call rollback()on the model.

For example, ObjectControlleryou may have

actions: {
   discardChanges: function() {
      this.get('model').rollback();
   }
}
+6
source

For information: Model.rollback () - RENAMED for model.rollbackAttributes () https://github.com/emberjs/data/pull/3305

+2
source

All Articles