Delete created uncommitted record?

I cannot figure out how to delete the model created App.store.createRecord(). Take a look at this script: http://jsfiddle.net/Adw4F/2/ You can delete a record downloaded from fixtures (or a rest adapter) but not created.

+5
source share
3 answers

Using the latest version of the ember data and adding a few (ugly | crappy | clumsy) things, I got it working. Obviously not perfect, but working ...

See http://jsfiddle.net/MikeAski/Adw4F/32/

+1
source

If you did not commit the record, all you have to do is roll back the transaction.

Ember uses the default transaction if it is not specified. For instance:

record.get('transaction').rollback();

.

+2

:

record.deleteRecord({})

Or roll back the transaction.

0
source

All Articles