We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2229ead commit 365e01cCopy full SHA for 365e01c
lib/two_factor_authentication/controllers/helpers.rb
@@ -35,8 +35,13 @@ def handle_failed_second_factor(scope)
35
36
def two_factor_authentication_path_for(resource_or_scope = nil)
37
scope = Devise::Mapping.find_scope!(resource_or_scope)
38
+ namespace = if Devise.available_router_name
39
+ send(Devise.available_router_name)
40
+ else
41
+ self
42
+ end
43
change_path = "#{scope}_two_factor_authentication_path"
- send(change_path)
44
+ namespace.send(change_path)
45
end
46
47
0 commit comments