destroys manager and managed_user session

This commit is contained in:
rgarcia
2015-10-11 16:57:09 +02:00
parent 1193121f0e
commit 54a7597168
2 changed files with 8 additions and 1 deletions

View File

@@ -10,9 +10,16 @@ class Management::SessionsController < ActionController::Base
end
end
def destroy
destroy_session
redirect_to root_path, notice: t("devise.sessions.signed_out")
end
private
def destroy_session
session["manager_id"] = nil
session["managed_user_id"] = nil
end
end