Skip to content

Instantly share code, notes, and snippets.

@imjayson
Last active August 29, 2015 14:01
Show Gist options
  • Save imjayson/5f97e77494f88affd01a to your computer and use it in GitHub Desktop.
Save imjayson/5f97e77494f88affd01a to your computer and use it in GitHub Desktop.
Grails 2.3: REST + Scaffolding
Not sure if it is designed this way but it is wierd that the @Resource annotation doesn't work with generated scaffolding (generate-all).
It is easy to have 2 controller serving 1 domain class, but not ideal.
Evan's answer @ http://stackoverflow.com/questions/19465421/how-to-use-scaffolding-and-restfulness-together-in-grails-2-3 works.
It's a bit more work but the only 1 controller is needed
Note: will need a entry point (linking to the same controller)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment