Skip to content

Commit

Permalink
Change registration controller to redirect after submitting user edit…
Browse files Browse the repository at this point in the history
… form
  • Loading branch information
canan8 committed May 28, 2020
1 parent 5107b44 commit 3379403
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 5 additions & 1 deletion app/controllers/users/registrations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Users::RegistrationsController < Devise::RegistrationsController
# super
# end

# protected
protected

# If you have extra params to permit, append them to the sanitizer.
# def configure_sign_up_params
Expand All @@ -50,6 +50,10 @@ def configure_account_update_params
devise_parameter_sanitizer.permit(:account_update, keys: [:name, :title])
end

def after_update_path_for(resource)
sign_in_after_change_password? ? user_path(resource) : new_session_path(resource_name)
end

# The path used after sign up.
# def after_sign_up_path_for(resource)
# super(resource)
Expand Down
4 changes: 0 additions & 4 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

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'

Expand Down

0 comments on commit 3379403

Please sign in to comment.