Skip to content

Commit

Permalink
Fixes #454, docs for backbone.sync
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Jul 2, 2011
1 parent a30ea0d commit cbefdb8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,8 @@ <h2 id="Upgrading">Upgrading to 0.5.0</h2>
<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>
Expand Down Expand Up @@ -1627,14 +1629,13 @@ <h2 id="Sync">Backbone.sync</h2>
</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>
Expand Down

0 comments on commit cbefdb8

Please sign in to comment.