plataformatec/devise — pull request #2634 by gregates (2013-09-16 14:15:51+00:00)
Title: Tweaks confirmation flow for signed_in users

For #2627

When allow_unconfirmed_access_for > 0, users may be already signed in at the time they confirm their account. Consequently, the default confirmation should be compatible with this possibility. Additionally, they should not be
redirected to the sign in form after confirmation in this case. So I've changed ConfirmationsController#after_confirmation_path_for to send the user to the root path when signed in, or the sign in form otherwise.