Skip to content

Commit 3534b44

Browse files
author
David Tang
committed
documentation
1 parent 986a5e7 commit 3534b44

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

apidocs.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ These methods return a promise
4444

4545
#### Collection Resource
4646

47-
Create a resource by specifying a Backbone model, collection, a unique name, and the property name that uniquely identifies the models for this resource type (the primary key). Creating a resource is the first step to storing your data in the store.
47+
Create a collection resource by specifying a Backbone model, collection, a unique name, and the property name that uniquely identifies the models for this resource type (the primary key).
4848

4949
```js
5050
var Person = Backbone.Model.extend({
@@ -67,6 +67,8 @@ DS.defineResource({
6767

6868
#### Model Resource
6969

70+
Create a model resource by specifying a Backbone model and a unique name.
71+
7072
```js
7173
var UserProfile = Backbone.Model.extend();
7274

@@ -160,7 +162,7 @@ DS.findAll('person', { incomplete: true }).done(function(collection) {
160162
});
161163
```
162164

163-
## DS.find(resourceName, id [, options])
165+
## DS.find(resourceName [, id, options])
164166

165167
Fetch a model if it is not in the data store, or return a model already in the store wrapped up in a resolved promise.
166168

@@ -208,7 +210,9 @@ DS.find('person', 3).then(function(person) {
208210
#### Model Resources
209211

210212
```js
211-
DS.find('profile').then(function(profile) {});
213+
DS.find('profile').then(function(profile) {
214+
// Loads profile model and caches it for subsequent requests
215+
});
212216
```
213217

214218
### DS.create(resourceName, model)

0 commit comments

Comments
 (0)