Skip to content

Instantly share code, notes, and snippets.

/gist:1785f7bc2ed25a4f6edb Secret

Created Apr 16, 2014
What would you like to do?
In the component's init:
Variables.Categories =
{ 'T1' : 'Beetle'
, 'T1C' : 'Beetle Cabrio'
, 'CO' : 'Corrado'
, 'MISC' : 'MISC'
Then the equivalent getVehicleCategories to what you have is just:
<cfreturn Variables.Categories[Arguments.vehicleID] />
(But obviously can include any additional logic, like StructKeyExists/etc, as required.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.