I have the following identical code-block in all my controllers' beforeInterceptor blocks:
def beforeInterceptor = {
request.someField = Foo.someFoo(request)
if (!request.someField) {
redirect(...)
return
}
}
Repeating the exact same code fragment in all controllers violates DRY. Is there some standard Grails way to define a "global" beforeInterceptor?