mirror of https://github.com/rails/rails
Merge pull request #6084 from brainopia/support_for_magic_domain_on_all_stores
Support cookie jar options for all cookie stores
This commit is contained in:
commit
bca9a9e926
|
@ -74,6 +74,13 @@ module ActionDispatch
|
||||||
class AbstractStore < Rack::Session::Abstract::ID
|
class AbstractStore < Rack::Session::Abstract::ID
|
||||||
include Compatibility
|
include Compatibility
|
||||||
include StaleSessionCheck
|
include StaleSessionCheck
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def set_cookie(env, session_id, cookie)
|
||||||
|
request = ActionDispatch::Request.new(env)
|
||||||
|
request.cookie_jar[key] = cookie
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -254,6 +254,13 @@ class ActiveRecordStoreTest < ActionDispatch::IntegrationTest
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_session_store_with_all_domains
|
||||||
|
with_test_route_set(:domain => :all) do
|
||||||
|
get '/set_session_value'
|
||||||
|
assert_response :success
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def with_test_route_set(options = {})
|
def with_test_route_set(options = {})
|
||||||
|
|
Loading…
Reference in New Issue