Model Class
isInstance()
Signature
Section titled “Signature”isInstance() — returns boolean
Available in: model
Category: Miscellaneous Functions
Description
Section titled “Description”Use this method to check whether you are currently in an instance object.
Examples
Section titled “Examples”// Use the passed in `id` when we're not already in an instance
function memberIsAdmin(){
if(isInstance()){
return this.admin;
} else {
return this.findByKey(arguments.id).admin;
}
}