diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 0b2fd6d9..f90b2bbc 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,45 +1,45 @@

Update Profile

- +
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> - -
"> - <%= f.label :name, class: "control-label" %> - <%= f.text_field :name, class: "form-control", value: current_user.name, required: true %> - <%= errors_for resource, :name %> -
- -
"> - <%= f.label :email, class: "control-label" %> - <%= f.email_field :email, class: "form-control", value: current_user.email, required: true %> - <%= errors_for resource, :email %> -
- - <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> -
Currently waiting confirmation for: <%= resource.unconfirmed_email %>
- <% end %> - -
"> - <%= f.label :password, class: "control-label" %> - <%= f.password_field :password, class: "form-control", autocomplete: false %> - <%= errors_for resource, :password %> -
- -
"> - <%= f.label :password_confirmation, class: "control-label" %> - <%= f.password_field :password_confirmation, class: "form-control" %> - <%= errors_for resource, :password_confirmation %> -
- -
"> - <%= f.label :current_password, class: "control-label" %> - <%= f.password_field :current_password, class: "form-control" %> - <%= errors_for resource, :current_password %> -
- -
<%= f.submit "Update", class: "btn btn-primary" %>
+ +
"> + <%= f.label :name, class: "control-label" %> + <%= f.text_field :name, class: "form-control", value: current_user.name, required: true %> + <%= errors_for resource, :name %> +
+ +
"> + <%= f.label :email, class: "control-label" %> + <%= f.email_field :email, class: "form-control", value: current_user.email, required: true %> + <%= errors_for resource, :email %> +
+ + <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> +
Currently waiting confirmation for: <%= resource.unconfirmed_email %>
+ <% end %> + +
"> + <%= f.label :password, class: "control-label" %> + <%= f.password_field :password, class: "form-control", autocomplete: false %> + <%= errors_for resource, :password %> +
+ +
"> + <%= f.label :password_confirmation, class: "control-label" %> + <%= f.password_field :password_confirmation, class: "form-control" %> + <%= errors_for resource, :password_confirmation %> +
+ +
"> + <%= f.label :current_password, class: "control-label" %> + <%= f.password_field :current_password, class: "form-control" %> + <%= errors_for resource, :current_password %> +
+ +
<%= f.submit "Update", class: "btn btn-primary" %>
<% end %>
@@ -48,7 +48,7 @@

If you would like to close your account and have all your data deleted, then you can:

<%= button_to "Close Account", registration_path(resource_name), class: "btn btn-danger", method: :delete %> - +
<%= link_to "Back", :back %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e4feb9ef..bfa9e12e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -41,7 +41,7 @@ diff --git a/config/routes.rb b/config/routes.rb index a188f5ef..8adc2281 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -427,7 +427,7 @@ def matches?(request) get "tweets/stats" => "tweets#stats", as: "tweets_stats" resources :tweets, only: [:index, :show] - devise_for :users, path: "users", path_names: { sign_in: "login", sign_out: "logout", sign_up: "register" } + devise_for :users, path: "users", path_names: { sign_in: "login", sign_out: "logout", sign_up: "register", edit: "settings" } as :user do get "login" => "devise/sessions#new", as: "new_session" get "logout" => "devise/sessions#destroy", as: "logout"