Skip to content

Commit aa7b9c2

Browse files
committed
minor edits in Syncer docs
1 parent 3ea3572 commit aa7b9c2

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

_syncer/formatClientUrl.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ header: formatClientUrl
33
example: Syncer.formatClientUrl(url, api)
44
---
55

6-
This function will create the URL that is expected on the client application. It requires the URL and the api (which defaults to '/api'). This will then create the URL for the [API proxy](/api-proxy). Generally, `formatClientUrl` only needs to be invoked by `getUrl`.
6+
This function will create the URL that is expected on the client application. It requires the URL and the api (which defaults to '/api'). This will then create the URL for the API proxy. Generally, `formatClientUrl` only needs to be invoked by `getUrl`.
77

_syncer/getUrl.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ header: getUrl
33
example: Syncer.getUrl(url, clientPrefix, params)
44
---
55

6-
The method is expecting a url, the value set on a [model](/model#url) or [collection](/collection#url) which can be created with the url or urlRoot attributes.
6+
The method is expecting a url string that is set on a [model](/model#url) or [collection](/collection#url) using the `url` or `urlRoot` attributes.
77

8-
In the end the result will be a string value of the URL for the API.

_syncer/interpolateParams.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ header: interpolateParams
33
example: Syncer.interpolateParams(modelOrCollection, url, params)
44
---
55

6-
This will interpolate the url strings, for instance if the url you have set on a model is: `/model/:attr`, and the model has the value `1` for the `attr` attribute, the resulting url will be `/model/1`.
6+
This will interpolate the url strings. For instance if the url you have set on a model is: `/game/:category`, and the game has the value `dice` for the `category` attribute, the resulting url will be `/game/dice`.
77

8-
This function makes it so we can easily change the url parameters based on attributes in the model / collection.
9-
10-
If interpolating a collection, it will check the options of the collection for the data to interpolate.
8+
This function enables us to easily change the url parameters based on attributes in the model / collection. If interpolating a collection, it will check the collection's options for the data to interpolate.
119

_syncer/objectsDiffer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ header: objectsDiffer
33
example: Syncer.objectsDiffer(modelA, modelB)
44
---
55

6-
This method deeply compares the data of two different models / collections, returns true if they're different, false if they're the same.
6+
This method deeply compares the data of two different models / collections and returns true if they're different, false if they're the same.
77

_syncer/sync.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ header: sync
33
example: Syncer.sync(method, model, options)
44
---
55

6-
This method is called automatically behind the scenes when `.save`, `.fetch`, and `.destroy` are called. It works on the client or server, to send an AJAX request to an API.
6+
This method is called automatically behind the scenes when `.save`, `.fetch`, and `.destroy` are called. It sends an AJAX request to an API, either on the client or the server.

0 commit comments

Comments
 (0)