Skip to content

Commit 9fffb13

Browse files
committed
Add destroy record examples
1 parent 0761911 commit 9fffb13

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

app/routes/application.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ export default class ApplicationRoute extends Route {
3434
{
3535
id: 'create-record',
3636
classicFiles: ['old.js'],
37-
octaneFiles: ['new.js'],
37+
octaneFiles: ['in-place-body.js', 'handler.js'],
3838
},
3939
{
4040
id: 'save-record',
4141
classicFiles: ['old.js'],
42-
octaneFiles: ['new.js'],
42+
octaneFiles: ['new.js', 'handler.js'],
4343
},
4444
],
4545
},
@@ -48,7 +48,7 @@ export default class ApplicationRoute extends Route {
4848
subsections: [
4949
{
5050
id: 'delete-record',
51-
classicFiles: ['old.js'],
51+
classicFiles: ['old.js', 'destroy.js'],
5252
octaneFiles: ['new.js'],
5353
},
5454
],
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
const user = this.store.peekRecord('user', '1');
2+
await user.destroyRecord();
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
const user = this.store.peekRecord('user', '1');
22
user.deleteRecord();
33
await user.save();
4+
user.unloadRecord();

0 commit comments

Comments
 (0)