Possible Duplicate:
Grails - getting a message value from controller
I want to use a g.message() method inside a Service
class, not a Controller
.
But I can't.
Code example:
// this is a method OUTSIDE a Controller
def show = {
def msg = message(code:"foo.bar") // I'm getting error here
}
It's possible to do this, or I have to use the old ResourceBundle
class?