[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [Engine-Users] Filters order in Controllers James Adam Fri Aug 29 04:01:21 2008

On Fri, Aug 29, 2008 at 11:28 AM, Antonio Tapiador del Dujo
> El Thursday 28 August 2008 14:13:04 James Adam escribió:
>> The order of filters will be determined by the order that the
>> controller files are loaded, and this is currently plugins first, then
>> application. So filters defined in the application will be invoked
>> after those defined in plugins, by default.
> Uhmm, that doesn't explain the behaviour of my app.
> :-?
> What happens if a filter is defined in the plugin and redefined in the
> application?

Ah - good question. Sorry if I missed it in my earlier response!

I believe the behaviour would be the same as if you added the filter
twice in the same controller - it will get called twice. My advice
would be not define the filter in both your application AND the plugin
controllers - only define it in one.

> Do you know how can I see the contents of the filter chain?

I'm not sure about this off-hand, but the Rails docs should be helpful.

* J *
Engine-Users mailing list