The Rails docs for devise say that the instructions for how to redirect are incorrect:
https://github.com/plataformatec/devise/wiki/How-To:-Add-:confirmable-to-Users#redirecting-user
Does anyone know how to do this?
The Rails docs for devise say that the instructions for how to redirect are incorrect:
https://github.com/plataformatec/devise/wiki/How-To:-Add-:confirmable-to-Users#redirecting-user
Does anyone know how to do this?
you will need to override devise confirmation controller. in your routes.rb add this line
devise_for :users, controllers: { confirmations: 'confirmations' }
create file in and paste this code
class ConfirmationsController < Devise::ConfirmationsController
private
def after_confirmation_path_for(resource_name, resource)
your_new_after_confirmation_path #your path where you want to land
end
end
you may also need to restart the server.
Source : https://github.com/plataformatec/devise/wiki/How-To:-Add-:confirmable-to-Users#redirecting-user