Last active
August 29, 2015 14:13
-
-
Save sbrady/35069a3d614179b1ddbc to your computer and use it in GitHub Desktop.
Give Grails more rails like RESTful routes
This file contains 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
"/$controller"(parseRequest: true) { | |
action = [GET: "index", POST: "save"] | |
} | |
"/$controller/$id"(parseRequest: true) { | |
action = [GET: "show", PUT: "update", POST: "update", DELETE: "delete"] | |
constraints { | |
id matches: /\d+/ | |
} | |
} | |
"/$controller/new"(parseRequest: true) { | |
action = [GET: "create"] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment