我的 application_controller 中有以下字符串:
before_filter :login_required, :only => [ :edit, :update, :show, :index ]
但是如果使用 :show,我需要将 {:controller => 'users', :action => 'show'} 放在异常中。有可能这样做吗?
最佳答案
选项:
skip_before_filter :login_required, :only => :show
关于ruby-on-rails - before_filter : is it possible to specify controller for action?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3664559/