diff --git a/app/controllers/users/registrations_controller.rb b/app/controllers/users/registrations_controller.rb
index b9e664f..7846429 100644
--- a/app/controllers/users/registrations_controller.rb
+++ b/app/controllers/users/registrations_controller.rb
@@ -2,7 +2,7 @@
class Users::RegistrationsController < Devise::RegistrationsController
# before_action :configure_sign_up_params, only: [:create]
- # before_action :configure_account_update_params, only: [:update]
+ before_action :configure_account_update_params, only: [:update]
# GET /resource/sign_up
# def new
@@ -46,9 +46,9 @@ class Users::RegistrationsController < Devise::RegistrationsController
# end
# If you have extra params to permit, append them to the sanitizer.
- # def configure_account_update_params
- # devise_parameter_sanitizer.permit(:account_update, keys: [:attribute])
- # end
+ def configure_account_update_params
+ devise_parameter_sanitizer.permit(:account_update, keys: [:name, :title])
+ end
# The path used after sign up.
# def after_sign_up_path_for(resource)
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb
index 38d95b8..2196e83 100644
--- a/app/views/devise/registrations/edit.html.erb
+++ b/app/views/devise/registrations/edit.html.erb
@@ -1,43 +1,63 @@
-
<%= render "devise/shared/error_messages", resource: resource %>
-
-
- <%= f.label :email %>
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
-
-
- <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
-
Currently waiting confirmation for: <%= resource.unconfirmed_email %>
- <% end %>
-
-
- <%= f.label :password %>
(leave blank if you don't want to change it)
- <%= f.password_field :password, autocomplete: "new-password" %>
- <% if @minimum_password_length %>
-
-
<%= @minimum_password_length %> characters minimum
+
+
+ <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'ui form'}) do |f| %>
+
+
+ <%= f.label :full_name %>
+ <%= f.text_field :name, autocomplete: "name" %>
+
+
+
+ <%= f.label :email %>
+ <%= f.email_field :email, autocomplete: "email" %>
+
+
+
+ <%= f.label :title %>
+ <%= f.text_field :title, autocomplete: "name" %>
+
+
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
+
Currently waiting confirmation for: <%= resource.unconfirmed_email %>
+ <% end %>
+
+
+ <%= f.label :password %>
+ <%= f.password_field :password, autocomplete: "new-password" %>
+
+
+
+ <%= f.label :password_confirmation %>
+ <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
+
+
+
+ <%= f.label :current_password %>
+ <%= f.password_field :current_password, autocomplete: "current-password" %>
+
+
+
+ <%= f.button "Save", class: 'blue ui button' %>
+ <%= link_to "Cancel", current_user, class: 'ui button'%>
+
<% end %>
+
+
Delete my account
+
+
Unhappy?
+ <%= link_to "Delete my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: 'negative ui button' %>
+
+
-
- <%= f.label :password_confirmation %>
- <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
-
-
-
- <%= f.label :current_password %> (we need your current password to confirm your changes)
- <%= f.password_field :current_password, autocomplete: "current-password" %>
-
-
-
- <%= f.submit "Update" %>
-
-<% end %>
-
-
Cancel my account
+
-
Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %>
-<%= link_to "Back", :back %>
diff --git a/app/views/layouts/_navigation.html.erb b/app/views/layouts/_navigation.html.erb
index b2ba3e0..66332d8 100644
--- a/app/views/layouts/_navigation.html.erb
+++ b/app/views/layouts/_navigation.html.erb
@@ -6,8 +6,8 @@
Account
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 9f6cf46..b004c5b 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,3 +1,26 @@
-
<%= @user.name %>
-
<%= @user.title %>
-
<%= @user.email %>
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+ <%= @user.email %>
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index 726a7c0..fc6a259 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -7,7 +7,12 @@
}
resources :users, only: [:show, :index]
+
+ as :user do
+ get 'users/edit', :to => 'devise/registrations#edit', :as => :user_root
+ end
+
root 'welcome#index'
get 'teams', to: 'teams#index'
- # post 'login', to: 'sessions#create'
+
end