Skip to content

Instantly share code, notes, and snippets.

@ddeyoung
Created December 7, 2012 16:09
Show Gist options
  • Save ddeyoung/4234264 to your computer and use it in GitHub Desktop.
Save ddeyoung/4234264 to your computer and use it in GitHub Desktop.
Grails URL mapping Based on dynamic request properties
"/path/to/stuff"(controller:"controller", action: "action"){
param={
def rtn = "get"
switch(request.method) {
case "GET":
rtn = "get"
break
case "PUT":
rtn = "update"
break
}
return rtn
}
format = "html"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment