Return to v2.2 docs

isInstance()


Model Class Miscellaneous Functions boolean model


Use this method to check whether you are currently in an instance object.

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

Related Functions

Miscellaneous Functions