Refactor user settings
All checks were successful
continuous-integration/drone/push Build is passing

Use resources instead of custom controllers, following the Rails way
and making things much cleaner in the process.
This commit is contained in:
Râu Cao
2023-04-03 13:19:07 +02:00
parent 6f2160b479
commit 7f77ad5528
11 changed files with 92 additions and 96 deletions

View File

@@ -0,0 +1,19 @@
<section>
<h3>E-Mail</h3>
<p class="mb-2">
<%= label :email, 'Address', class: 'font-bold' %>
</p>
<p class="flex gap-1 mb-2 sm:w-3/5">
<input type="text" id="email" class="grow"
value=<%= current_user.email %> disabled="disabled" />
</p>
</section>
<section>
<h3>Password</h3>
<p class="mb-8">Use the following button to request an email with a password reset link:</p>
<%= form_with(url: reset_password_settings_path, method: :post) do %>
<p>
<%= submit_tag("Send me a password reset link", class: 'btn-md btn-gray w-full sm:w-auto') %>
</p>
<% end %>
</section>