Skip before filter with Active Admin

前端 未结 4 927
逝去的感伤
逝去的感伤 2021-01-11 14:19

I am using devise and recently added active admin, which created a separate table of admin_users to keep admins.

All works fine with Active Admin when I try to log i

4条回答
  •  礼貌的吻别
    2021-01-11 14:36

    I couldn't get @coreyward's solution to work, but editing config/application.rb as per this Devise post and adding:

    ActiveAdmin.register_page "Dashboard" do
        controller do
          skip_before_action :name_of_filter_to_skip
        end
    
        # Other code
    end
    

    to admin/dashboard.rb did the trick. It didn't work by just editing config/application.rb alone. Make sure to restart your server!

提交回复
热议问题