In order to have a post-registration page, I added a RegistrationsController and method to provide a custom page to tell the user to check their email for the account confirmation link.
def after_inactive_sign_up_path_for(resource)
"/awaiting_confirmation"
end
Is there any way on that page (which is seen by a user who has created an account, but not confirmed it, and not signed in yet) to show the email address they used to create the account.
I’d like the page to say “we just sent a confirmation link to you at useremail@userdomain.com”
But the view for that page cannot display current_user.email because current_user is nil because they have not signed in.
Is there some other devise variable, or session variable, that would contain the registration info that was just created?
here’s how we solved it … it was easy.
modified the one-line controller method in my custom registration controller (shown in my question) to:
then in the receiving method for the route /awaiting_confirmation I simply do
and display the @email variable in my view.