I have something like this:
=========================================================================
class ApplicationController < ActionController::Base
def check_auth
# ...
end
end
class BaseController < ApplicationController
before_filter :check_auth, :except => [ :getSession ]
# more here...
def getSession()
# ...
end
end
class UserController < BaseController
before_filter :check_auth, :except => [ :getNotifications ]
# more here...
def getNotifications()
getSession()
# ...
end
end
=========================================================================
I'm was expecting wrongly that if UserController#getNotifications calls
BaseController#getSession check_auth would not called.
If I change the before_filter in my UserController to:
before_filter :check_auth, :except => [ :getSession, :getNotifications
]
it works as expected.
Isn't there a way to incorporate the before_filter settings from the
parent controller say during construction of an instance of a sub class?
Thanks for any help in advance
Pete
--
Posted via
http://www.ruby-forum.com/.