DeleteModel Mixin

This commit is contained in:
Matthew Ryan Dillon 2015-11-03 13:58:01 -07:00
parent cc85ee6f27
commit 3f5eb26a33
3 changed files with 31 additions and 9 deletions

View file

@ -0,0 +1,15 @@
import Ember from 'ember';
const { Mixin } = Ember;
export default Mixin.create({
transitionRoute: null,
actions: {
delete: function() {
this.get('model').destroyRecord().then(() => {
this.transitionToRoute(this.get('transitionRoute'));
});
},
},
});