[Pkg-javascript-commits] [backbone] 128/211: Adding in a note about passing in an object literal or a model to Collection.create. Thanks to MattJ for the recommendation.

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:00:13 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.5.0
in repository backbone.

commit f44cfeeb36d2435d59f198872606ae04ac4c6e40
Author: Samuel Clay <samuel at ofbrooklyn.com>
Date:   Mon Apr 25 13:01:03 2011 -0400

    Adding in a note about passing in an object literal or a model to Collection.create. Thanks to MattJ for the recommendation.
---
 index.html | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/index.html b/index.html
index 071f85f..9749d3c 100644
--- a/index.html
+++ b/index.html
@@ -1377,6 +1377,12 @@ Accounts.fetch();
       model from being created. In order for this to work, your should set the
       <a href="#Collection-model">model</a> property of the collection.
     </p>
+    
+    <p>
+      You can pass in either an object literal or an existing model object. If you use
+      an existing model, it will have its collection set to this collection, thereby 
+      removing it from any previous collection.
+    </p>
 
 <pre>
 var Library = Backbone.Collection.extend({

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