[Pkg-javascript-commits] [backbone] 32/101: creating a model should set its attribute

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 16:58:26 UTC 2014


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

js pushed a commit to tag 0.1.0
in repository backbone.

commit c63f01ee129c14afaf31deec322209f05195732c
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Wed Oct 6 11:28:43 2010 -0400

    creating a model should set its attribute
---
 backbone.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/backbone.js b/backbone.js
index 148b1ec..7c33cb3 100644
--- a/backbone.js
+++ b/backbone.js
@@ -398,6 +398,7 @@
       if (!(model instanceof Backbone.Model)) model = new this.model(model);
       model.collection = this;
       var success = function(model, resp) {
+        model.set(resp.model);
         model.collection.add(model);
         if (options.success) options.success(model, resp);
       };

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