Skip to content

Commit 10cfd01

Browse files
feat: add two-factor view helpers
1 parent 1ca4334 commit 10cfd01

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/helpers/devise_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22

33
# Keeping the helper around for backward compatibility.
44
module DeviseHelper
5+
def two_factor_method_links(resource, current_method)
6+
methods = resource.enabled_two_factors - [current_method]
7+
safe_join(methods.map { |method| render "devise/two_factor/#{method}_link" })
8+
end
59
end

0 commit comments

Comments
 (0)