From 673879683c87a1588e13020c25e3c4d73bf96985 Mon Sep 17 00:00:00 2001 From: Richard Pringle Date: Mon, 19 Sep 2016 12:52:34 -0400 Subject: [PATCH] Call new disable remote method from model class. --- lib/model.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/model.js b/lib/model.js index 1926628b0..496397270 100644 --- a/lib/model.js +++ b/lib/model.js @@ -429,14 +429,12 @@ module.exports = function(registry) { /** * Disable remote invocation for the method with the given name. * - * @param {String} name The name of the method. - * @param {Boolean} isStatic Is the method static (eg. `MyModel.myMethod`)? Pass - * `false` if the method defined on the prototype (eg. - * `MyModel.prototype.myMethod`). + * @param {String} name The name of the method (include `prototype.` if the method is defined on the prototype). + * */ Model.disableRemoteMethod = function(name, isStatic) { - this.sharedClass.disableMethod(name, isStatic || false); + this.sharedClass.disableMethodByName(name); this.emit('remoteMethodDisabled', this.sharedClass, name); };