ENH: Add collection delete (#69)

Fixes #37
This commit is contained in:
Matthew Ryan Dillon 2018-02-08 08:08:03 -07:00 committed by GitHub
parent eb4537afb1
commit 6f01fbf00f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 0 deletions

View file

@ -5,5 +5,10 @@ export default Controller.extend({
editCollection() {
this.transitionToRoute('collections.detail.edit', this.get('model'));
},
deleteCollection() {
this.get('model')[0].destroyRecord().then(() => {
this.transitionToRoute('collections');
});
},
},
});