build/knockout.app.js
function(model_s, create, options){
      var toAdd = model_s instanceof Array ? model_s : [model_s],
          self = this;

      ko.utils.arrayForEach(toAdd, function(attributes){
        var model;
        if(attributes instanceof Model){
          model = attributes;
          model.collection = self;
        }else{
          model = new self.model(attributes, {collection: self});
        }
        self.models.push(model);
        if(create) model.save(options);
      });
    }
function(model_s, create, options){
      var toAdd = model_s instanceof Array ? model_s : [model_s],
          self = this;

      ko.utils.arrayForEach(toAdd, function(attributes){
        var model;
        if(attributes instanceof Model){
          model = attributes;
          model.collection = self;
        }else{
          model = new self.model(attributes, {collection: self});
        }
        self.models.push(model);
        if(create) model.save(options);
      });
    }
function ( model_s , create , options ) { var toAdd = model_s instanceof Array ? model_s : [ model_s ] , self = this ; ko . utils . arrayForEach ( toAdd , function ( attributes ) { var model ; if ( attributes instanceof Model ) { model = attributes ; model . collection = self ; } else { model = new self . model ( attributes , { collection : self } ) ; } self . models . push ( model ) ; if ( create ) model . save ( options ) ; } ) ; }
Add one or more models to collection and optionally create them on the server setting the 'create' parameter to 'true' It will also add a reference to the collection on each model
Add one or more models to collection and optionally create them on the server setting the create parameter to true It will also add a reference to the collection on each model