Clean up after cancelling new model creation

Fixes #27
This commit is contained in:
Matthew Dillon 2015-10-29 16:41:50 -07:00
parent 6ab7e66d03
commit 6dbdd70d31
8 changed files with 27 additions and 17 deletions

View file

@ -13,7 +13,7 @@ export default Ember.Controller.extend({
ajaxError(characteristic.get('errors'), this.get('flashMessages'));
});
} else {
characteristic.deleteRecord().then(() => {
characteristic.destroyRecord().then(() => {
this.transitionToRoute('protected.characteristics.show', characteristic);
});
}