I had a question over at the active scaffold forum no one was biting on so I thought I''d try here. In the example below the create_authorized? is called by active scaffold to determine if links should display in the ui. This example works as I expect: class FooController < ApplicationController <snip> def create_authorized? authorized?(''create'') end end but if I try to move this method to ApplicationController like shown below the method is not called: class ApplicationController < ActionController::Base <snip> def create_authorized? authorized?(''create'') end end Maybe if I understood more how ruby/oop works, I could figure this out. Can anyone tell me how this is possible. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
is it accidentally under a private declaration in ApplicationController? On Sep 19, 8:23 pm, dailer <d.sai...-Wuw85uim5zDR7s880joybQ@public.gmane.org> wrote:> I had a question over at the active scaffold forum no one was biting > on so I thought I''d try here. In the example below the > create_authorized? is called by active scaffold to determine if links > should display in the ui. > > This example works as I expect: > > class FooController < ApplicationController > <snip> > def create_authorized? > authorized?(''create'') > end > end > > but if I try to move this method to ApplicationController like shown > below the method is not called: > > class ApplicationController < ActionController::Base > <snip> > def create_authorized? > authorized?(''create'') > end > end > > Maybe if I understood more how ruby/oop works, I could figure this > out. Can anyone tell me how this is possible.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
good thought, but I tried the following, which should prove that out, no? class ApplicationController < ActionController::Base <snip> protected def create_authorized? authorized?(''create'') end end On Sep 19, 10:38 pm, Andrew Bloom <akbl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> is it accidentally under a private declaration in > ApplicationController? > > On Sep 19, 8:23 pm, dailer <d.sai...-Wuw85uim5zDR7s880joybQ@public.gmane.org> wrote: > > > I had a question over at the active scaffold forum no one was biting > > on so I thought I''d try here. In the example below the > > create_authorized? is called by active scaffold to determine if links > > should display in the ui. > > > This example works as I expect: > > > class FooController < ApplicationController > > <snip> > > def create_authorized? > > authorized?(''create'') > > end > > end > > > but if I try to move this method to ApplicationController like shown > > below the method is not called: > > > class ApplicationController < ActionController::Base > > <snip> > > def create_authorized? > > authorized?(''create'') > > end > > end > > > Maybe if I understood more how ruby/oop works, I could figure this > > out. Can anyone tell me how this is possible.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---