From c7e81314ebb1f2578005d162ab57dd7010467db8 Mon Sep 17 00:00:00 2001 From: Matchu Date: Sun, 6 Aug 2023 17:35:16 -0700 Subject: [PATCH] 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! --- app/views/devise/registrations/edit.html.erb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index c5e9dd3d..c61fa346 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,8 +1,13 @@ -

Edit <%= resource_name.to_s.humanize %>

+

Settings

<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> <%= render "devise/shared/error_messages", resource: resource %> +
+ <%= f.label :name, 'Username' %>
+ <%= f.text_field :name, autofocus: true, autocomplete: "username" %> +
+
<%= f.label :email %>
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>