Browse Source

Stop hardcoding User, use generic resource

User can also be called Admin. so use generic "resource" same way devise uses.
master
Gaurish Sharma 8 years ago committed by GitHub
parent
commit
5b81724c01
  1. 4
      app/views/devise/two_factor_authentication/show.html.erb

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

@ -1,4 +1,4 @@
<% if current_user.direct_otp %>
<% if resource.direct_otp %>
<h2>Enter the code that was sent to you</h2>
<% else %>
<h2>Enter the code from your authenticator app</h2>
@ -11,7 +11,7 @@
<%= submit_tag "Submit" %>
<% end %>
<% if current_user.direct_otp %>
<% if resource.direct_otp %>
<%= link_to "Resend Code", resend_code_user_two_factor_authentication_path, action: :get %>
<% else %>
<%= link_to "Send me a code instead", resend_code_user_two_factor_authentication_path, action: :get %>

Loading…
Cancel
Save