Skip to content

Commit

Permalink
Episode 11.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Peters committed Apr 27, 2010
1 parent f2cec5e commit 31e661a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions views/user/helpers.cfm
@@ -0,0 +1,13 @@
<cffunction name="displayGender">
<cfargument name="genderAbbrev" type="string">

<cfswitch expression="#arguments.genderAbbrev#">
<cfcase value="M">
<cfreturn 'Male'>
</cfcase>
<cfcase value="F">
<cfreturn 'Female'>
</cfcase>
</cfswitch>

</cffunction>
2 changes: 1 addition & 1 deletion views/user/profile.cfm
Expand Up @@ -5,7 +5,7 @@
<h1>#user.firstName# #user.lastName#</h1>
<p>
<strong>Gender</strong><br />
#user.gender#
#displayGender(user.gender)#
</p>
<p>
<strong>Member Since</strong><br />
Expand Down

0 comments on commit 31e661a

Please sign in to comment.