I have a controller that I am trying to use a beforeFilter on. My controller has the following methods: __construct(), approve(), deny(), destroy(), listing(), flag(), _getComment(), and _getSubmissions().
In theory the third beforeFilter is supposed to apply the method _requireContestOwner() to all methods EXCEPT for the flag() method but when I load the listing() method in my browser the before filter doesn't apply.
However if I do this: $this->beforeFilter( array( '_requireContestOwner' => array( 'only' => array ('listing') ) ) ); then it works.
Can anyone find fault with anything that I'm doing? I have tried: $this->beforeFilter( array( '_requireContestOwner' => array( 'except' => 'flag') ) ); but it yields the same result.
Any help would be appreciated. Thanks.
CommentAuthorpogeybait4883
After more testing it appears there may be an issue with using 'except'. The following code seems to work fine: