Re: One module for two ''super'' controllers

Frederick Cheung
Sun, 09 Dec 2007 22:34:09 -0000

On 9 Dec 2007, at 22:11, Erwin wrote:

>
> Thanks for your reply. So I''ll put the code in a seperate module.
Is
> there some example how to do this?
>
don''t know about that. There''s not really much to explain -
you just
do it.

Fred
> Erwin
>
> On 9 dec, 15:33, Frederick Cheung
<frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>> On 9 Dec 2007, at 10:09, Erwin wrote:
>>
>>
>>
>>> Hi,
>>
>>> I have two plugins with rails active-rbac and actionflow.
Actionflow
>>> uses his own controller, so I have two super controllers one for
the
>>> application (ApplicationController) and one for actionflow
>>> (FlowApplicationController with base ActionFlow::Base). Now I want
>>> to
>>> use functionality in both controllers like authorization en
>>> authentication. What is the best way to such a thing, must I build
a
>>> class a module, etc. And are there examples with a solution for my
>>> problem.
>>
>> If you are asking whether a module is a good way to go for sharing
>> some code (eg before_filters for authentication, logging etc...)
>> between controllers, then yes, that will work.
>>
>> Fred
> >