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

Erwin
Sun, 09 Dec 2007 22:11:16 -0000

Thanks for your reply. So I''ll put the code in a seperate module. Is
there some example how to do this?

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