DS.Model#rollbackAttributes()

rollbackAttributes

Defined in addon/-private/system/model/model.js:671
Available since 1.13.0

If the model hasDirtyAttributes this function will discard any unsaved changes. If the model isNew it will be removed from the store.

Example

record.get('name'); // 'Untitled Document'
record.set('name', 'Doc 1');
record.get('name'); // 'Doc 1'
record.rollbackAttributes();
record.get('name'); // 'Untitled Document'
doc_EmberJs
2016-11-30 16:50:12
Comments
Leave a Comment

Please login to continue.