examples/todos/js/backbonefire.js
function(snap) {
        var newModel = Backbone.Firebase._checkId(snap);

        if (typeof newModel === 'object' && newModel !== null) {
          var diff = _.difference(_.keys(this.attributes), _.keys(newModel));
          _.each(diff, _.bind(function(key) {
            this.unset(key);
          }, this));
        }

        // check to see if it needs an id
        this._setId(snap);

        return newModel;
      }
function(snap) {
        var newModel = Backbone.Firebase._checkId(snap);

        if (typeof newModel === 'object' && newModel !== null) {
          var diff = _.difference(_.keys(this.attributes), _.keys(newModel));
          _.each(diff, _.bind(function(key) {
            this.unset(key);
          }, this));
        }

        // check to see if it needs an id
        this._setId(snap);

        return newModel;
      }
function ( snap ) { var newModel = Backbone . Firebase . _checkId ( snap ) ; if ( typeof newModel === 'object' && newModel !== null ) { var diff = _ . difference ( _ . keys ( this . attributes ) , _ . keys ( newModel ) ) ; _ . each ( diff , _ . bind ( function ( key ) { this . unset ( key ) ; } , this ) ) ; } // check to see if it needs an id this . _setId ( snap ) ; return newModel ; }
Unset attributes that have been deleted from the server
by comparing the keys that have been removed.
Unset attributes that have been deleted from the server by comparing the keys that have been removed .