Add Model.disableRemoteMethod()
This commit is contained in:
parent
dc58412e18
commit
712478a50c
|
@ -380,6 +380,19 @@ Model.remoteMethod = function(name, options) {
|
||||||
this.sharedClass.defineMethod(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) {
|
Model.belongsToRemoting = function(relationName, relation, define) {
|
||||||
var modelName = relation.modelTo && relation.modelTo.modelName;
|
var modelName = relation.modelTo && relation.modelTo.modelName;
|
||||||
modelName = modelName || 'PersistedModel';
|
modelName = modelName || 'PersistedModel';
|
||||||
|
|
Loading…
Reference in New Issue