code: function(indexOrItem) {
            this._assertNotDestroyed('$save');
            var self = this;
            var item = self._resolveItem(indexOrItem);
            var key = self.$keyAt(item);
            if( key !== null ) {
              var ref = self.$ref().ref().child(key);
              var data = $wilddogUtils.toJSON(item);
              return $wilddogUtils.doSet(ref, data).then(function() {
                self.$$notify('child_changed', key);
                return ref;
              });
            }
            else {
              return $wilddogUtils.reject('Invalid record; could determine key for '+indexOrItem);
            }
          }
docs: Pass either an item in the array or the index of an item and it will be saved back
  to Wilddog. While the array is read-only and its structure should not be changed,
  it is okay to modify properties on the objects it contains and then save those back
  individually.
  
  Returns a future which is resolved when the data has successfully saved to the server.
  The resolve callback will be passed a Wilddog ref representing the saved element.
  If passed an invalid index or an object which is not a record in this array,
  the promise will be rejected.
  
  @param {int|object} indexOrItem
  @returns a promise resolved after data is saved