Skip to content

Commit

Permalink
use replace security question path for update (#2787) (#2791)
Browse files Browse the repository at this point in the history
Co-authored-by: Utkarsh Shukla <utkarsh7989@gmail.com>
  • Loading branch information
sri49 and utkarsh7989 authored Oct 2, 2024
1 parent 589cc48 commit aa346d0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
<div class="modal-header">
<h4 class="modal-title" id="securityQuestionModalLabel">Please help us secure your account</h4>
</div>
<%= form_for [:user, current_user.security_question_responses.build], url: main_app.user_security_question_responses_path(user_id: current_user.id.to_s), method: method, name: "user_security_question_responses[]", remote: true do |f| %>
<% if current_user.security_question_responses.present? %>
<% url = main_app.user_security_question_responses_replace_path(user_id: current_user.id.to_s)%>
<% else %>
<% url = main_app.user_security_question_responses_path(user_id: current_user.id.to_s)%>
<% end %>
<%= form_for [:user, current_user.security_question_responses.build], url: url, method: method, name: "user_security_question_responses[]", remote: true do |f| %>
<div class="modal-body">
<p>Please take a moment to provide security responses for three choices from our available options</p>
<p>These questions help us confirm your identity if you forget your password, or if your account behaves suspiciously and is locked.</p>
Expand Down

0 comments on commit aa346d0

Please sign in to comment.