[Pkg-javascript-commits] [backbone] 14/23: Fixes #454, docs for backbone.sync
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 17:00:44 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.5.1
in repository backbone.
commit cbefdb8a555efdcec6302d5998a9db17ec2e165b
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date: Sat Jul 2 10:04:05 2011 -0400
Fixes #454, docs for backbone.sync
---
index.html | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/index.html b/index.html
index b91c119..92f483f 100644
--- a/index.html
+++ b/index.html
@@ -383,6 +383,8 @@
<tt>refresh</tt> is now <a href="#Collection-reset">reset</a>.
The previous <tt>saveLocation</tt> and <tt>setLocation</tt>
functions have been replaced by <a href="#Router-navigate">navigate</a>.
+ <tt>Backbone.sync</tt>'s method signature has changed to allow the passing
+ of arbitrary options to <tt>jQuery.ajax</tt>.
Be sure to <a href="#History-start">opt-in</a> to <tt>pushState</tt> support,
if you want to use it.
</p>
@@ -1627,14 +1629,13 @@ $(function(){
</p>
<p>
- The method signature of <b>Backbone.sync</b> is <tt>sync(method, model, success, error)</tt>
+ The method signature of <b>Backbone.sync</b> is <tt>sync(method, model, [options])</tt>
</p>
<ul>
<li><b>method</b> – the CRUD method (<tt>"create"</tt>, <tt>"read"</tt>, <tt>"update"</tt>, or <tt>"delete"</tt>)</li>
<li><b>model</b> – the model to be saved (or collection to be read)</li>
- <li><b>success({model: ...})</b> – a callback that should be fired if the request works</li>
- <li><b>error({model: ...})</b> – a callback that should be fired if the request fails</li>
+ <li><b>options</b> – success and error callbacks, and all other jQuery request options</li>
</ul>
<p>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git
More information about the Pkg-javascript-commits
mailing list