From 0bf7af104d6dd5b1bdb6bb9eabf9183131fcff96 Mon Sep 17 00:00:00 2001 From: Ritchie Martori Date: Wed, 5 Feb 2014 15:27:58 -0800 Subject: [PATCH] fixup! rename Change.track => rectifyModelChanges --- lib/models/change.js | 2 +- lib/models/model.js | 4 ++-- test/change.test.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/models/change.js b/lib/models/change.js index 41e9b876..1328a964 100644 --- a/lib/models/change.js +++ b/lib/models/change.js @@ -88,7 +88,7 @@ Change.setup(); * @param {Array} changes Changes that were tracked */ -Change.track = function(modelName, modelIds, callback) { +Change.rectifyModelChanges = function(modelName, modelIds, callback) { var tasks = []; var Change = this; diff --git a/lib/models/model.js b/lib/models/model.js index 2214a116..30277d38 100644 --- a/lib/models/model.js +++ b/lib/models/model.js @@ -551,7 +551,7 @@ Model.enableChangeTracking = function() { var cleanupInterval = Model.settings.changeCleanupInterval || 30000; Model.on('changed', function(obj) { - Change.track(Model.modelName, [obj.id], function(err) { + Change.rectifyModelChanges(Model.modelName, [obj.id], function(err) { if(err) { console.error(Model.modelName + ' Change Tracking Error:'); console.error(err); @@ -560,7 +560,7 @@ Model.enableChangeTracking = function() { }); Model.on('deleted', function(obj) { - Change.track(Model.modelName, [obj.id], function(err) { + Change.rectifyModelChanges(Model.modelName, [obj.id], function(err) { if(err) { console.error(Model.modelName + ' Change Tracking Error:'); console.error(err); diff --git a/test/change.test.js b/test/change.test.js index 358fbbfa..fbc24739 100644 --- a/test/change.test.js +++ b/test/change.test.js @@ -42,11 +42,11 @@ describe('Change', function(){ }); }); - describe('Change.track(modelName, modelIds, callback)', function () { + describe('Change.rectifyModelChanges(modelName, modelIds, callback)', function () { describe('using an existing untracked model', function () { beforeEach(function(done) { var test = this; - Change.track(this.modelName, [this.modelId], function(err, trakedChagnes) { + Change.rectifyModelChanges(this.modelName, [this.modelId], function(err, trakedChagnes) { if(err) return done(err); test.trakedChagnes = trakedChagnes; done();