Skip to content

Commit

Permalink
Fixes #1098
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Mar 14, 2012
1 parent 64f37ce commit 9414513
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
initialize: function(){},

// Return a copy of the model's `attributes` object.
toJSON: function() {
toJSON: function(options) {
return _.clone(this.attributes);
},

Expand Down Expand Up @@ -528,8 +528,8 @@

// The JSON representation of a Collection is an array of the
// models' attributes.
toJSON: function() {
return this.map(function(model){ return model.toJSON(); });
toJSON: function(options) {
return this.map(function(model){ return model.toJSON(options); });
},

// Add a model, or list of models to the set. Pass **silent** to avoid
Expand Down

0 comments on commit 9414513

Please sign in to comment.