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
|
@ -90,13 +90,7 @@ module Devise
|
||||||
session.keys.grep(/^devise\./).each { |k| session.delete(k) }
|
session.keys.grep(/^devise\./).each { |k| session.delete(k) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def expire_data_after_sign_out!
|
alias :expire_data_after_sign_out! :expire_data_after_sign_in!
|
||||||
# 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
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue