Skip to content

Commit 2cad35b

Browse files
Merge pull request #550 from sebastien-prudhomme/fix-setupinstance-doc
Fix how models are instanciated
2 parents ea2b093 + 50261e3 commit 2cad35b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/model-classes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ For an example of how you might use `setupInstance`, suppose we have two service
262262
setupInstance(data, { store, models }) {
263263
if (data.posts) {
264264
// Turn posts into an array of Post instances
265-
data.posts = data.posts.map(post => new models.Post(post))
265+
data.posts = data.posts.map(post => new models.api.Post(post))
266266
}
267267
return data
268268
}

0 commit comments

Comments
 (0)