All threads / DEVISE: How do I redirect to a custom message page after user signs up and is required to confirm email address ?

Ask A Question

Notifications

You’re not receiving notifications from this thread.

DEVISE: How do I redirect to a custom message page after user signs up and is required to confirm email address ?

prithviraj sukale asked in Gems / Libraries
I want to create a custom page that says "Go confirm your email" after Sign up using Devise

Did you get an answer to this? I'm looking for the same information.

I think I will try to override the method:

# app/config/routes.rb
# devise_for :users, :controllers => {:registrations => "registrations"}

# app/controllers/registrations_controller.rb
class RegistrationsController < Devise::RegistrationsController
  protected
  def after_sign_in_path_for(resource)
    # cofirm_email_sent_path
  end

Something like that - a lot like the recommendations for confirmable: https://github.com/plataformatec/devise/wiki/How-To:-Add-:confirmable-to-Users

so I looked at the controller for devise registrations:
https://github.com/plataformatec/devise/blob/master/app/controllers/devise/registrations_controller.rb)

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,344+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.