I am using the ActiveAdmin gem in a rails app. If I wanted to add a new before filter that applies to all activeadmin gems, how would I do this? I imagine I could modify the BaseController in ActiveAdmin to achieve this, but what is the proper way to make this modification from within the rails app? Is there a way to duplicate and overwrite the BaseController?
Asked
Active
Viewed 2,805 times
2 Answers
9
If I understand you , there is a special config for this
# == Controller Filters
#
# You can add before, after and around filters to all of your
# Active Admin resources from here.
#
config.before_filter do
end
you can find it in initializers/active_admin.rb

Fivell
- 11,829
- 3
- 61
- 99
-
tried this with .skip_after_filter but got a no method error – sixty4bit Jan 23 '15 at 20:56
0
I did same thing by writing my code in config/initializers/active_admin.rb
. Just check the line
#enter code here
#Controller Filters
# You can add before, after and around filters to all of your
# Active Admin resources and pages from here.
Write down your code here same as described by Fivell

Cookie Vagabond
- 1
- 1
- 2