I'm trying to override a controller action (namely, organizations#destroy) in the Katello plugin. The only way I can think of to do this is to create a new route (katello_destroy_organization) and deface the appropriate views to point all old organization destroy links to it. This seems inefficient though. I was hoping maybe someone knew how to override a controller action or a route from a plugin?
Thanks.
David
> I'm trying to override a controller action (namely, organizations#destroy)
> in the Katello plugin. The only way I can think of to do this is to create
> a new route (katello_destroy_organization) and deface the appropriate views
> to point all old organization destroy links to it. This seems inefficient
> though. I was hoping maybe someone knew how to override a controller action
> or a route from a plugin?
>
>
add a mixin and use alias_method_chain :distroy, :new_stuff?
Ohd
···
On Tue, Jul 1, 2014 at 3:18 PM, David Davis wrote:
Thanks.
David
–
You received this message because you are subscribed to the Google Groups
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I just found where we're doing something like this with smart_proxies_controller too.
Thanks.
David
···
----- Original Message -----
> From: "David Davis"
> To: foreman-dev@googlegroups.com
> Sent: Tuesday, July 1, 2014 8:27:13 AM
> Subject: Re: [foreman-dev] Overriding a controller action
>
> Ah, that works. Thanks.
>
> David
>
> ----- Original Message -----
> > From: "Ohad Levy"
> > To: "foreman-dev"
> > Sent: Tuesday, July 1, 2014 8:19:22 AM
> > Subject: Re: [foreman-dev] Overriding a controller action
> >
> > On Tue, Jul 1, 2014 at 3:18 PM, David Davis wrote:
> >
> > > I'm trying to override a controller action (namely,
> > > organizations#destroy)
> > > in the Katello plugin. The only way I can think of to do this is to
> > > create
> > > a new route (katello_destroy_organization) and deface the appropriate
> > > views
> > > to point all old organization destroy links to it. This seems inefficient
> > > though. I was hoping maybe someone knew how to override a controller
> > > action
> > > or a route from a plugin?
> > >
> > >
> > add a mixin and use alias_method_chain :distroy, :new_stuff?
> >
> > Ohd
> >
> > > Thanks.
> > >
> > > David
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "foreman-dev" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an
> > > email to foreman-dev+unsubscribe@googlegroups.com.
> > > For more options, visit https://groups.google.com/d/optout.
> > >
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "foreman-dev" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to foreman-dev+unsubscribe@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to foreman-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>