My application controller looks like this
class ApplicationController < ActionController::Base
include AuthenticatedSystem
helper :all # include all helpers, all the time
protect_from_forgery # :secret => 'sup3rs3cr3t'
filter_parameter_logging :password
# Here's the interesting bit
before_filter :login_required, :except => [:index, :show, :new]
end
Now I have another controller that looks like this
class CompletelySecretController < ApplicationController
# the other interesting bit
before_filter :login_required
def index
@secrets = Secret.find(:all)
end
end
I can still see all of the secrets, despite me stating that a login is required for all actions with
before_filter :login_required
Is it not intuitive to think that the before_filter
in the child class overrides the before_filter
in the parent class?