diff --git a/lib/models/model.js b/lib/models/model.js index c2fa8715..af5581fa 100644 --- a/lib/models/model.js +++ b/lib/models/model.js @@ -380,6 +380,19 @@ Model.remoteMethod = function(name, options) { this.sharedClass.defineMethod(name, options); } +/** + * 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`). + */ + +Model.disableRemoteMethod = function(name, isStatic) { + this.sharedClass.disableMethod(name, isStatic || false); +} + Model.belongsToRemoting = function(relationName, relation, define) { var modelName = relation.modelTo && relation.modelTo.modelName; modelName = modelName || 'PersistedModel';