mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-08 23:28:00 -05:00
Merge pull request #5306 from janz93/cleanup
Add to-do to cleanup rack/rails session bug fix when supporting Rails 5.2+ only
This commit is contained in:
@@ -106,10 +106,12 @@ module Devise
|
||||
private
|
||||
|
||||
def expire_data_after_sign_in!
|
||||
# TODO: remove once Rails 5.2+ and forward are only supported.
|
||||
# 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user