mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
parent
c0b6963049
commit
000edbbbac
1 changed files with 5 additions and 2 deletions
|
@ -227,8 +227,11 @@ module ActionDispatch
|
|||
# TODO This should be broken apart into AD::Request::Session and probably
|
||||
# be included by the session middleware.
|
||||
def reset_session
|
||||
session.destroy if session && session.respond_to?(:destroy)
|
||||
self.session = {}
|
||||
if session && session.respond_to?(:destroy)
|
||||
session.destroy
|
||||
else
|
||||
self.session = {}
|
||||
end
|
||||
@env['action_dispatch.request.flash_hash'] = nil
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue