Skip to content

Commit 276f506

Browse files
fix: requested changes
1 parent 3d93624 commit 276f506

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

guides/release/models/finding-records.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Use [`store.peekRecord()`](https://api.emberjs.com/ember-data/release/classes/St
1919
This will return the record only if it is already present in the store:
2020

2121
```javascript
22-
let blogPost = this.store.peekRecord('blog-post', 1); // => no network request
22+
let blogPost = this.store.peekRecord('blog-post', '1'); // => no network request
2323
```
2424

2525
### Retrieving Multiple Records
@@ -40,7 +40,7 @@ Use [`store.peekAll()`](https://api.emberjs.com/ember-data/release/classes/Store
4040
let blogPosts = this.store.peekAll('blog-post'); // => no network request
4141
```
4242

43-
`findRecord()` returns a `PromiseArray` that fulfills to a `RecordArray` and `store.peekAll` directly returns a `RecordArray`.
43+
`findRecord()` returns a `response` which has the record and `store.peekAll` directly returns a `RecordArray`.
4444

4545
It's important to note that `RecordArray` is not a JavaScript array, it's an object that implements [`MutableArray`](https://api.emberjs.com/ember/release/classes/MutableArray).
4646
This is important because, for example, if you want to retrieve records by index,
@@ -104,8 +104,9 @@ Then, calling `queryData()` will retrieve that object from the server:
104104
```javascript
105105
import { queryData } from './builders';
106106

107-
const user = await this.requestManager.request(queryData())
107+
const user = await this.requestManager.request(queryData());
108108
let username = user.get('username');
109+
109110
console.log(`Currently logged in as ${username}`);
110111
```
111112

0 commit comments

Comments
 (0)