As far as I know, if I want to create an action in a controller then I can do it by:
class My Controller {
def myAction = {
println \"in my action \"
I'm not sure, but I think that it used to be the first way was the only way to do it, and then it changed to allow the second way. I think that the second way is the preffered way, but I'm not sure.
[Edit]
Here is another stack overflow post further explaining it:
Why should grails actions be declared as methods instead of closures and what difference does it make?