Created
March 29, 2012 19:01
-
-
Save bittersweetryan/2242137 to your computer and use it in GitHub Desktop.
Blog Post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
public Array function list(Struct options = {}) | |
output=false hint="I return a list of active, non-deleted people by default."{ | |
//create our default options | |
var defaults = { | |
deleted = false, | |
active = true | |
}; | |
//now combine this struct with the options | |
//making sure to pass the defaults in first | |
//and the user options in second | |
arguments.options = StructHelpers.extend(defaults, | |
arguments.options); | |
//now that we have our options set load the entity | |
return entityLoad("Person",arguments.options); | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment