Skip to content

Commit 840f4f9

Browse files
committed
Remove deprecated Ember Data usage
Partially addresses #1921
1 parent 42b34ec commit 840f4f9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

guides/release/models/finding-records.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ tom = store.query('user', {
119119
120120
}
121121
}).then(function(users) {
122-
return users.get('firstObject');
122+
return users[0]; // the first object
123123
});
124124
```
125125

guides/release/models/relationships.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ export default class AdeleRoute extends Route {
425425
include: 'albums'
426426
})
427427
.then(function(artists) {
428-
return artists.firstObject;
428+
return artists[0];
429429
});
430430
}
431431
}

guides/release/routing/redirection.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default class PostsRoute extends Route {
7474

7575
afterModel(model, transition) {
7676
if (model.get('length') === 1) {
77-
this.router.transitionTo('post', model.get('firstObject'));
77+
this.router.transitionTo('post', model[0]);
7878
}
7979
}
8080
}
@@ -128,7 +128,7 @@ export default class PostsRoute extends Route {
128128

129129
redirect(model, transition) {
130130
if (model.get('length') === 1) {
131-
this.router.transitionTo('posts.post', model.get('firstObject'));
131+
this.router.transitionTo('posts.post', model[0]);
132132
}
133133
}
134134
}

0 commit comments

Comments
 (0)