Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Oct 20, 2010
2 parents 931338e + 89e7e67 commit c957ec0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,11 @@
// The default model for a collection is just a **Backbone.Model**.
// This should be overridden in most cases.
model : Backbone.Model,

// Return a array containing each model's toJSON result.
toJSON : function() {
return this.models.map(function(model){ return model.toJSON(); })
},

// Add a model, or list of models to the set. Pass **silent** to avoid
// firing the `added` event for every new model.
Expand Down

0 comments on commit c957ec0

Please sign in to comment.