Model.constructor only take attrs, not models.

As per discussion in #873.
This commit is contained in:
Brad Dunbar
2012-01-18 23:06:12 -05:00
parent a739098049
commit 66161b06fd

View File

@@ -364,7 +364,7 @@
// Create a new model with identical attributes to this one.
clone : function() {
return new this.constructor(this);
return new this.constructor(this.attributes);
},
// A model is new if it has never been saved to the server, and lacks an id.