在过滤之前Rails ActiveAdmin

时间:2011-09-09 12:16:54

标签: ruby-on-rails activeadmin

我想添加“is_admin?”过滤到ActiveAdmin初始化程序。我应该在哪个文件中定义“is_admin?”方法

  # == Controller Filters
  #
  # You can add before, after and around filters to all of your
  # Active Admin resources from here. 
  #
  config.before_filter :is_admin?

1 个答案:

答案 0 :(得分:14)

在你的app / controllers / application_controller.rb