Can edit username in user settings page

Right yeah, this just works once we add it to the view! People will be pleased about this :3

Also change the title to Settings!
This commit is contained in:
Emi Matchu 2023-08-06 17:35:16 -07:00
parent 83bbb84382
commit c7e81314eb

View file

@ -1,8 +1,13 @@
<h2>Edit <%= resource_name.to_s.humanize %></h2> <h2>Settings</h2>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %> <%= render "devise/shared/error_messages", resource: resource %>
<div class="field">
<%= f.label :name, 'Username' %><br />
<%= f.text_field :name, autofocus: true, autocomplete: "username" %>
</div>
<div class="field"> <div class="field">
<%= f.label :email %><br /> <%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %> <%= f.email_field :email, autofocus: true, autocomplete: "email" %>