Question

I'm familiar with the concept that dynamic methods are added via AOP to domain objects in Grails. But since they're dynamic, how is it that you find the documentation to them?

It wouldn't be obvious where to look for the documentation for these methods even if I knew what Interceptor classes might apply the methods to the domain objects...

Was it helpful?

Solution

There is "Grails Runtime Docs" plugin ( http://grails.org/plugin/grails-runtime-docs ) which will generate the groovy documentation from runtime also including the dynamic methods. It will add "Dynamic Method Summary" & "Dynamic Method Detail" in the generated html docs which provide their source information. The classes are also categorized into Controllers, Commands, Domains, Services and Tag Libraries. Note: I'm a grails developer and contributed this open-source plugin to Grails myself. Hope you find it useful.

OTHER TIPS

Behold the Grails Docs! http://grails.org/doc/latest/ On the right side you have a quick reference that lists among other things dynamic methods added to Domain Classes. It's a good read, enjoy :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top