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:
parent
2510c949e5
commit
3207c73d4b
1 changed files with 1 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue