Specify which controllers to exclude from before_filter

后端 未结 4 643
無奈伤痛
無奈伤痛 2020-12-13 01:11

I\'m using devise for authentication and have some before_filters in my application controller. Issue I\'m seeing is that when I try to logout the before_filter intercepts t

4条回答
  •  [愿得一人]
    2020-12-13 01:41

    In config/application.rb

    config.to_prepare do
      Devise::SessionsController.skip_before_filter :authenticate_user!
    end
    

    Referenced by:

    How to skip a before_filter for Devise's SessionsController?

提交回复
热议问题