0
我想僅在用戶登錄active_admin
時才運行before_filter
。換句話說,運行before_filter
,除非執行會話操作(新建,創建,銷燬)。ActiveAdmin - 僅在登錄時執行before_filter
我有以下的配置爲active_admin
:
config.authentication_method = :authenticate_user!
config.before_filter :my_before_filter
的問題是,my_before_filter
執行甚至當用戶試圖登錄每次添加except: []
似乎並沒有工作。任何幫助將不勝感激。
注意:它似乎工作如前所述我跑bundle update
。我在我的Gemfile中有以下內容:
gem 'activeadmin', github: 'gregbell/active_admin'
我不希望''before_filter'在用戶註銷時執行,在這種情況下,它會是。我希望它每次都運行,除非用戶登錄和註銷。 –