Skip to content

Commit d43c7d8

Browse files
authored
Merge pull request #125 from jskirst/scopeable-view
dynamically generate path based on resource scope
2 parents 9c1af25 + 93674d2 commit d43c7d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/views/devise/two_factor_authentication/show.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<% end %>
1313

1414
<% if resource.direct_otp %>
15-
<%= link_to "Resend Code", resend_code_user_two_factor_authentication_path, action: :get %>
15+
<%= link_to "Resend Code", send("resend_code_#{resource_name}_two_factor_authentication_path"), action: :get %>
1616
<% else %>
17-
<%= link_to "Send me a code instead", resend_code_user_two_factor_authentication_path, action: :get %>
17+
<%= link_to "Send me a code instead", send("resend_code_#{resource_name}_two_factor_authentication_path"), action: :get %>
1818
<% end %>
19-
<%= link_to "Sign out", destroy_user_session_path, :method => :delete %>
19+
<%= link_to "Sign out", send("destroy_#{resource_name}_session_path"), :method => :delete %>

0 commit comments

Comments
 (0)