code: function(_options){
        if(this.validate() !== true) return false;
  
        var self = this, //model
            options = _options || {},
            success = options.success, //custom success function passed in _options
            method = this.isNew() ? 'create' : 'update';
  
        options.success = function(data){
          if(method === 'create') self.id(data[self.idAttribute]);
          if(success) success(self, data);
        };
  
        return this.sync.call(this, method, this, options);
      }
docs: Save the model on the server If model.isNew() returns true the model will be created, otherwise it will be updated Options for the sync method can be passed as an object