mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-30 03:00:06 -04:00
Merge pull request #2397 from wyuenho/collection-fetch-doc-fix
Update Collection#fetch's doc to refer to Collection#set
This commit is contained in:
@@ -2027,8 +2027,8 @@ var Tweets = Backbone.Collection.extend({
|
||||
callbacks which will be passed <tt>(collection, response, options)</tt>
|
||||
and <tt>(collection, xhr, options)</tt> as arguments, respectively.
|
||||
When the model data returns from the server, the collection will be (efficiently)
|
||||
<a href="#Collection-reset">reset</a>, unless you pass <tt>{update: true}</tt>,
|
||||
in which case it will use <a href="#Collection-update">update</a> to (intelligently)
|
||||
<a href="#Collection-reset">reset</a>, unless you pass <tt>{set: true}</tt>,
|
||||
in which case it will use <a href="#Collection-set">set</a> to (intelligently)
|
||||
merge the fetched models.
|
||||
Delegates to <a href="#Sync">Backbone.sync</a>
|
||||
under the covers for custom persistence strategies and returns a
|
||||
@@ -2050,10 +2050,10 @@ accounts.fetch();
|
||||
|
||||
<p>
|
||||
The behavior of <b>fetch</b> can be customized by using the available
|
||||
<a href="#Collection-update">update</a> options. For example, to fetch a
|
||||
<a href="#Collection-set">set</a> options. For example, to fetch a
|
||||
collection, getting an <tt>"add"</tt> event for every new model, and
|
||||
a <tt>"change"</tt> event for every changed existing model, without
|
||||
removing anything: <tt>collection.fetch({update: true, remove: false})</tt>
|
||||
removing anything: <tt>collection.fetch({set: true, remove: false})</tt>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user