diff --git a/app/pods/protected/strains/show/controller.js b/app/pods/protected/strains/show/controller.js new file mode 100644 index 0000000..ab4d552 --- /dev/null +++ b/app/pods/protected/strains/show/controller.js @@ -0,0 +1,11 @@ +import Ember from 'ember'; + +export default Ember.Controller.extend({ + actions: { + delete: function() { + this.get('model').destroyRecord(); + this.transitionToRoute('protected.strains.index'); + }, + }, + +}); diff --git a/app/pods/protected/strains/show/template.hbs b/app/pods/protected/strains/show/template.hbs index e16634a..5260d43 100644 --- a/app/pods/protected/strains/show/template.hbs +++ b/app/pods/protected/strains/show/template.hbs @@ -105,4 +105,5 @@ {{#link-to 'protected.strains.edit' model.id class="button-gray smaller"}} Edit {{/link-to}} + {{delete-button delete=(action 'delete')}} {{/if}}