Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails ActiveAdmin before filter

I want to add "is_admin?" filter to ActiveAdmin initializer. In which file should I define the "is_admin?" method?

  # == Controller Filters
  #
  # You can add before, after and around filters to all of your
  # Active Admin resources from here. 
  #
  config.before_filter :is_admin?
like image 340
krn Avatar asked Sep 09 '11 12:09

krn


Video Answer


1 Answers

In your app/controllers/application_controller.rb

like image 67
rkusa Avatar answered Oct 05 '22 15:10

rkusa