sign in user after confirmation

This commit is contained in:
Stella 2014-11-30 20:06:12 +02:00 committed by Stella Rouzi
parent 343bdec617
commit 31df114ce4
2 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,12 @@
class ConfirmationsController < Devise::ConfirmationsController
protected
def after_confirmation_path_for(resource_name, resource)
if signed_in?
signed_in_root_path(resource)
else
sign_in resource
root_path
end
end
end