You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How To: Customize the redirect after a user edits their profile
Normally, after a user edits their profile they are redirected to the root_path. To have Devise redirect to a custom route after an update, follow these steps:
Sub-class Devise's registration controller.
Override the after_update_path_for(resource) method.
Configure Devise's routing.
Example subclass/override (registrations_controller.rb):
The above code, will redirect the user back to the edit page, after the form submits with success. Depending on how you have configured your registrations views (if at all) you may need to move them into a different package.
Alternatively, you can define user_root in your config/routes.rb:-