Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to define multiple distinct controllers in Grails 2 filter?

Is it possible to define multiple distinct controller in a Grails 2 web application filter? For example, something like:

def filters = {
    someFilterMethod(controller: 'controller1 controller2 ...', action: '*') {
        ...
    }
}

Otherwise, is there a way to specify to not include the main index.gsp in the filter?

like image 926
Nico Huysamen Avatar asked Jan 20 '12 12:01

Nico Huysamen


1 Answers

Use the pipe symbol:

def filters = {
   someFilterMethod(controller: 'controller1|controller2|...', action: '*') {
      ...
   }
}
like image 83
Burt Beckwith Avatar answered Oct 22 '22 11:10

Burt Beckwith