New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README - url clarifications to address repeat gitter questions #41

Merged
merged 2 commits into from Mar 6, 2015

Conversation

Projects
None yet
2 participants
@cdaringe
Member

cdaringe commented Mar 6, 2015

Primarily to update url docs, but some other minor tidying too. Comment annotated.

@@ -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.

@cdaringe

cdaringe Mar 6, 2015

Member

add URLs to xhr and set

@cdaringe

cdaringe Mar 6, 2015

Member

add URLs to xhr and set

bear added a commit that referenced this pull request Mar 6, 2015

Merge pull request #41 from cdaringe/master
README - url clarifications to address repeat gitter questions

@bear 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