problems with inheritance (:: issues?)
i have the following two controllers:
(PagesController < applicationController::Base )
in the applicationcontroller, i have some methods that implement the acl
system in my app (i.e,
class ApplicationController < ActionController::Base
which is spread across all of my controllers
(inlcuding the PageController < ApplicationController)
lately i’ve created a third controller, cms_controller.rb, which i want
to inherit all methods/functions from the above two.
so i did:
Class CmsController < PagesController < ApplicationController
Class CmsController < PagesController::ApplicationController
works only for methods in PagesController
Class CmsController < ApplicationController::PagesController
works only for methods in ApplicationController
Class CmsController < PagesController
be enough? if Pages < Application, shouldn’t Cms < Pages be enough to
inherit both controller methods?
i obviously am missing some important basic inheritance knowledge (at
least, i hope i am)…if someone could fill me in or point me out to
some reference, i would greatly appreciate it.