Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upREADME - url clarifications to address repeat gitter questions #41
Conversation
cdaringe
reviewed
Mar 6, 2015
| @@ -81,9 +81,9 @@ Available options: | ||
| ### save `model.save([attributes], [options])` | ||
| Save a model to your database (or alternative persistence layer), by delegating to [ampersand-sync](https://github.com/ampersandjs/ampersand-sync). Returns a xhr object if validation is successful and false otherwise. The attributes hash (as in set) should contain the attributes you'd like to change — keys that aren't mentioned won't be altered — but, a *complete representation* of the resource will be sent to the server. As with `set`, you may pass individual keys and values instead of a hash. If the model has a validate method, and validation fails, the model will not be saved. If the model `isNew`, the save will be a "create" (HTTP POST), if the model already exists on the server, the save will be an "update" (HTTP PUT). | ||
| Save a model to your database (or alternative persistence layer) by delegating to to [ampersand-sync](https://github.com/ampersandjs/ampersand-sync). Returns a [xhr](https://github.com/Raynos/xhr) object if validation is successful and false otherwise. The attributes hash (as in [set](https://github.com/AmpersandJS/ampersand-state/blob/master/README.md#set-statesetattributes-options-statefirstname--henrik)) should contain the attributes you'd like to change — keys that aren't mentioned won't be altered — but, a *complete representation* of the resource will be sent to the server. As with `set`, you may pass individual keys and values instead of a hash. If the model has a validate method, and validation fails, the model will not be saved. If the model `isNew`, the save will be a "create" (HTTP POST). If the model already exists on the server, the save will be an "update" (HTTP PUT). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
bear
added
documentation
request
labels
Mar 6, 2015
added a commit
that referenced
this pull request
Mar 6, 2015
bear
merged commit fa4f121
into
AmpersandJS:master
Mar 6, 2015
1 check passed
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cdaringe commentedMar 6, 2015
Primarily to update
urldocs, but some other minor tidying too. Comment annotated.