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

Refactoring expire_data_after_sign_out!

This method is same to `expire_data_after_sign_in!`,
so alias it
This commit is contained in:
yui-knk 2015-06-03 13:14:18 +09:00
parent 2510c949e5
commit 3207c73d4b

View file

@ -90,13 +90,7 @@ module Devise
session.keys.grep(/^devise\./).each { |k| session.delete(k) }
end
def expire_data_after_sign_out!
# session.keys will return an empty array if the session is not yet loaded.
# This is a bug in both Rack and Rails.
# A call to #empty? forces the session to be loaded.
session.empty?
session.keys.grep(/^devise\./).each { |k| session.delete(k) }
end
alias :expire_data_after_sign_out! :expire_data_after_sign_in!
end
end
end