Created
September 23, 2013 20:14
-
-
Save sergiomichels/6676249 to your computer and use it in GitHub Desktop.
Magic to access request inside UrlMappings
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
| class UrlMappings { | |
| static mappings = { | |
| "/$controller/$action?/$id?"{ | |
| constraints { | |
| // apply constraints here | |
| } | |
| } | |
| "/" { | |
| println request //Nope, just Chuck Testa! | |
| controller = { | |
| println request //Oh yeah | |
| } | |
| } | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment