Skip before filter with Active Admin

前端 未结 4 928
逝去的感伤
逝去的感伤 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:41

    In config/initializers/active_admin.rb you can add the following:

    config.skip_before_action :authenticate_user!
    

    You can also use the DSL provided to modify the ActiveAdmin controller: http://activeadmin.info/docs/8-custom-actions.html#modify_the_controller

    Note: For Rails versions before 5.0 you will want to use skip_before_filter.

提交回复
热议问题