Skip to content

Instantly share code, notes, and snippets.

@pascaldevink
Created October 18, 2009 20:29
Show Gist options
  • Save pascaldevink/212825 to your computer and use it in GitHub Desktop.
Save pascaldevink/212825 to your computer and use it in GitHub Desktop.
def save = {
def sdfh = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss")
params.signupdate = sdfh.parse(params.signupdate)
def u = new Signup()
u.properties = params
if (u.save()) {
render u as XML
} else {
render u.errors as XML
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment