Devise showing unauthenticated message instead of signed_up_but_unconfirmed

I am using the default Devise controllers. I assumed when a user created a new account, they’d be redirected to the sign_in page and shown the flash message for signed_up_but_unconfirmed. The redirect is happening, but the flash message being displayed is unauthenticated.

Why would I need to tell Devise to show the signed_up_but_unconfirmed message when new accounts are created? That seems like the way it should work out of the box.

And more importantly, how do I configure it to show signed_up_but_unconfirmed?

(I asked this on Stack Overflow, but have gotten no love.)

After much sleuthing, I have finally found a solution to this in an old Stack Overflow thread. The short of it is this:

Override the registration controller:

rails g devise:controllers users -c=registrations

Uncomment the after_inactive_sign_up_path_for method in the registratons_controller:

def after_inactive_sign_up_path_for(resource)
  new_user_session_path
end
1 Like