我的应用程序控制器如下所示
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
现在我有了另一个控制器
class CompletelySecretController < ApplicationController
# the other interesting bit
before_filter :login_required
def index
@secrets = Secret.find(:all)
end
end
我仍然可以看到所有的秘密,尽管我声明所有操作都需要登录
before_filter :login_required
难道认为
before_filter
在子类中重写
过滤前
在家长班?