From b78d221f3768a77062251bece3a3677eccffbe60 Mon Sep 17 00:00:00 2001 From: Aubin LORIEUX Date: Tue, 12 Jul 2016 16:49:56 +0200 Subject: [PATCH] Fix set_flash_message for :attempt_failed --- app/controllers/devise/two_factor_authentication_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/devise/two_factor_authentication_controller.rb b/app/controllers/devise/two_factor_authentication_controller.rb index a7c6c09..0a00b48 100644 --- a/app/controllers/devise/two_factor_authentication_controller.rb +++ b/app/controllers/devise/two_factor_authentication_controller.rb @@ -47,7 +47,7 @@ class Devise::TwoFactorAuthenticationController < DeviseController def after_two_factor_fail_for(resource) resource.second_factor_attempts_count += 1 resource.save - set_flash_message :alert, find_message(:attempt_failed), now: true + set_flash_message :alert, :attempt_failed, now: true if resource.max_login_attempts? sign_out(resource)