1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

we should not fetch Devise.mappings.keys twice in #sign_out_everybody

This commit is contained in:
Denis Lifanov 2010-06-24 03:06:32 +08:00 committed by José Valim
parent 1924a915a8
commit 8370006591

View file

@ -66,9 +66,10 @@ module Devise
def sign_out_everybody
# Not "warden.logout" since we need to sign_out only devise-defined scopes.
Devise.mappings.keys.each { |scope| warden.user(scope) }
scopes = Devise.mappings.keys
scopes.each { |scope| warden.user(scope) }
warden.raw_session.inspect
warden.logout(*Devise.mappings.keys)
warden.logout(*scopes)
end
# Returns and delete the url stored in the session for the given scope. Useful