Created
March 25, 2011 11:45
-
-
Save neokoenig/886740 to your computer and use it in GitHub Desktop.
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
<cffunction name="update"> | |
<cfloop from=1 to="#arraylen(contact.emailaddresses)#" index="i"> | |
<cfset contact.emailaddresses[i].delete()> | |
</cfloop> | |
<cfset contact.update(params.contact)> | |
<cfif contact.hasErrors()> | |
<cfset renderPage(action="edit")> | |
<cfelse> | |
<cfset flashInsert(success="The contact was updated successfully.")> | |
<cfset redirectTo(action="view", key=contact.id)> | |
</cfif> | |
</cffunction> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment