Remove safeguard against a previously broken `NullSessionHash#reset_session`.

This behavior was fixed on https://github.com/rails/rails/pull/12279.
This commit is contained in:
Lucas Mazza 2015-12-18 14:39:06 -02:00
parent b4904a4ba2
commit 9499736593
1 changed files with 1 additions and 10 deletions

View File

@ -3,17 +3,8 @@ module Warden::Mixins::Common
@request ||= ActionDispatch::Request.new(env)
end
# Deprecate: Remove this check once we move to Rails 4 only.
NULL_STORE =
defined?(ActionController::RequestForgeryProtection::ProtectionMethods::NullSession::NullSessionHash) ?
ActionController::RequestForgeryProtection::ProtectionMethods::NullSession::NullSessionHash : nil
def reset_session!
# Calling reset_session on NULL_STORE causes it fail.
# This is a bug that needs to be fixed in Rails.
unless NULL_STORE && request.session.is_a?(NULL_STORE)
request.reset_session
end
request.reset_session
end
def cookies