mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Solve some warnings and a failing test.
This commit is contained in:
parent
74dd8a3681
commit
653acac069
2 changed files with 2 additions and 1 deletions
|
@ -191,6 +191,7 @@ module ActionController
|
|||
DEFAULT_OPTIONS = Rack::Session::Abstract::ID::DEFAULT_OPTIONS
|
||||
|
||||
def initialize(session = {})
|
||||
@env, @by = nil, nil
|
||||
replace(session.stringify_keys)
|
||||
@loaded = true
|
||||
end
|
||||
|
|
|
@ -199,7 +199,7 @@ 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.destroy if session && session.respond_to?(:destroy)
|
||||
self.session = {}
|
||||
@env['action_dispatch.request.flash_hash'] = nil
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue