From 838173a8817c49e7b6f5ebc383f68c23ba98123f Mon Sep 17 00:00:00 2001 From: Tigran Apoyan Date: Tue, 16 Aug 2016 16:59:53 +0400 Subject: [PATCH] set correct devise scope --- 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 0a00b48..f598d99 100644 --- a/app/controllers/devise/two_factor_authentication_controller.rb +++ b/app/controllers/devise/two_factor_authentication_controller.rb @@ -17,7 +17,7 @@ class Devise::TwoFactorAuthenticationController < DeviseController def resend_code resource.send_new_otp - redirect_to user_two_factor_authentication_path, notice: I18n.t('devise.two_factor_authentication.code_has_been_sent') + redirect_to send("#{resource_name}_two_factor_authentication_path"), notice: I18n.t('devise.two_factor_authentication.code_has_been_sent') end private