Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8167945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:21:53+00:00 2026-06-06T20:21:53+00:00

How can I create an after-confirmation redirect in Devise? Before I added the confirmation

  • 0

How can I create an after-confirmation redirect in Devise?

Before I added the confirmation module the custom after_sign_up_path worked fine for the first time login/signup but now when I click the confirmation link in the email it redirects to the path I set for the after-login path (user profile).

My goal is to create a form wizard and “getting started” page to collect additional information. The obvious caveat being that this redirect will only happen one time, upon confirmation.

I tried some other solutions that have been posted on Stack Overflow but none of them seem to work any longer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T20:21:55+00:00Added an answer on June 6, 2026 at 8:21 pm

    Essentially, you want to change around line 25 of Devise’s ConfirmationsController.

    This means you need to override the show action modifying the “happy path” of that if statement in the show action to your heart’s content:

    class ConfirmationsController < Devise::ConfirmationsController
      def new
        super
      end
    
      def create
        super
      end
    
      def show
        self.resource = resource_class.confirm_by_token(params[:confirmation_token])
    
        if resource.errors.empty?
          set_flash_message(:notice, :confirmed) if is_navigational_format?
          sign_in(resource_name, resource)
          respond_with_navigational(resource){ redirect_to confirmation_getting_started_path }
        else
          respond_with_navigational(resource.errors, :status => :unprocessable_entity){ render_with_scope :new }
        end
      end
    end
    

    And a scoped route for it (I put the view and action in the registrations controller but you can change it to whatever):

    devise_for :users, controllers: { confirmations: 'confirmations' }
    devise_scope :user do
      get '/confirmation-getting-started' => 'registrations#getting_started', as: 'confirmation_getting_started'
    end
    

    The default show action is referring to the protected after_confirmation_path_for method, so as another option, you could just modify what that method returns.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can create a string in JSON after a mysql select: $ritorno = '{Prodotto:'.$riga['Prodotto'].',Prezzo:'.$riga['Prezzo'].'}'
How can I bind a new element create after the page has loaded? I
I want create an application with animate button? how can i do? after click
I am trying to draw a circle after clicking a button. I can create
After my first question , id like to have a confirmation about the best
After several days of tests I find the only way I can create a
I'm trying to find out how I can create a pop-up menu bar, after
I integrated devise with facebook. Now when I create a user account after the
How can create a New user in ORACLE with full access (alter, delete, select,
Can I avoid forwarding after content is created / saved ? I don't want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.