Set user instance var for settings routes where needed

This commit is contained in:
Râu Cao
2023-05-27 19:58:59 +02:00
parent 193a4c2edd
commit 32d1992632
2 changed files with 8 additions and 8 deletions

View File

@@ -3,7 +3,7 @@
"settings--account--email-validation-failed-value": @validation_errors.present?
} do %>
<h3>E-Mail</h3>
<%= form_for(current_user, url: update_email_settings_path, method: "post") do |f| %>
<%= form_for(@user, url: update_email_settings_path, method: "post") do |f| %>
<%= hidden_field_tag :section, "account" %>
<p class="mb-2">
<%= f.label :email, 'Address', class: 'font-bold' %>