diff --git a/app/routes/application.js b/app/routes/application.js index 1f35f3e..d432306 100644 --- a/app/routes/application.js +++ b/app/routes/application.js @@ -34,12 +34,12 @@ export default class ApplicationRoute extends Route { { id: 'create-record', classicFiles: ['old.js'], - octaneFiles: ['new.js'], + octaneFiles: ['in-place-body.js', 'handler.js'], }, { id: 'save-record', classicFiles: ['old.js'], - octaneFiles: ['new.js'], + octaneFiles: ['new.js', 'handler.js'], }, ], }, @@ -48,7 +48,7 @@ export default class ApplicationRoute extends Route { subsections: [ { id: 'delete-record', - classicFiles: ['old.js'], + classicFiles: ['old.js', 'destroy.js'], octaneFiles: ['new.js'], }, ], diff --git a/snippets/deleting-data/delete-record/destroy.js b/snippets/deleting-data/delete-record/destroy.js new file mode 100644 index 0000000..75a6dd6 --- /dev/null +++ b/snippets/deleting-data/delete-record/destroy.js @@ -0,0 +1,2 @@ +const user = this.store.peekRecord('user', '1'); +await user.destroyRecord(); diff --git a/snippets/deleting-data/delete-record/old.js b/snippets/deleting-data/delete-record/old.js index 4d9a75c..4200db8 100644 --- a/snippets/deleting-data/delete-record/old.js +++ b/snippets/deleting-data/delete-record/old.js @@ -1,3 +1,4 @@ const user = this.store.peekRecord('user', '1'); user.deleteRecord(); await user.save(); +user.unloadRecord();