I need to implement a before_action
callback in my application controller only for activeadmin and devise controllers. For devise controllers I can do something like:
before_action :some_callback, if: :devise_controller?
How can I do the same for activeadmin controllers? I tried to make a method like:
def active_admin_controller?
if params[:controller] =~ /^admin\//i
true
end
end
but it doesn't work. Any ideas on how to reach the desired result? Thanks ahead.