提交 ec144bdd 编写于 作者: B blackst0ne

[Rails5] Add `raise: false` to skip_before_action in authenticates_with_two_factor.rb

Rails 5.0 raises `ArgumentErrror` if an unrecognised callback is skipped.
https://github.com/rails/rails/commit/8b88df94ebda2e829782f514ff51caeaf5e694dd
This commit adds `raise: false` to the filter.
上级 41ee09c9
......@@ -10,7 +10,7 @@ module AuthenticatesWithTwoFactor
# This action comes from DeviseController, but because we call `sign_in`
# manually, not skipping this action would cause a "You are already signed
# in." error message to be shown upon successful login.
skip_before_action :require_no_authentication, only: [:create]
skip_before_action :require_no_authentication, only: [:create], raise: false
end
# Store the user's ID in the session for later retrieval and render the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册