Skip to content

Instantly share code, notes, and snippets.

@bittersweetryan
Created March 29, 2012 19:01
Show Gist options
  • Save bittersweetryan/2242137 to your computer and use it in GitHub Desktop.
Save bittersweetryan/2242137 to your computer and use it in GitHub Desktop.
Blog Post
<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