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); };