diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-05 18:09:55 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-05 18:09:55 -0700 |
commit | 78960cf56084e830aabd0f97b17ea0fa86cb6f17 (patch) | |
tree | 979433844712d346529724d9cf6b4d2782263ca5 /actionpack | |
parent | 197141a8c7461b79074e1f9ebaddc2990eea6bf8 (diff) | |
download | rails-78960cf56084e830aabd0f97b17ea0fa86cb6f17.tar.gz rails-78960cf56084e830aabd0f97b17ea0fa86cb6f17.tar.bz2 rails-78960cf56084e830aabd0f97b17ea0fa86cb6f17.zip |
CookieJar does not need the key_generator parameter anymore
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/metal/request_forgery_protection.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/cookies.rb | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/metal/request_forgery_protection.rb b/actionpack/lib/action_controller/metal/request_forgery_protection.rb index e4246c46b7..b5e1a7ac1e 100644 --- a/actionpack/lib/action_controller/metal/request_forgery_protection.rb +++ b/actionpack/lib/action_controller/metal/request_forgery_protection.rb @@ -161,11 +161,10 @@ module ActionController #:nodoc: class NullCookieJar < ActionDispatch::Cookies::CookieJar #:nodoc: def self.build(request) - key_generator = request.key_generator host = request.host secure = request.ssl? - new(key_generator, host, secure, request) + new(host, secure, request) end def write(*) diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb index 62471f9ba4..fbcff3cd94 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -259,15 +259,14 @@ module ActionDispatch DOMAIN_REGEXP = /[^.]*\.([^.]*|..\...|...\...)$/ def self.build(req, cookies) - key_generator = req.key_generator host = req.host secure = req.ssl? - new(key_generator, host, secure, req).tap do |hash| + new(host, secure, req).tap do |hash| hash.update(cookies) end end - def initialize(key_generator, host = nil, secure = false, request) + def initialize(host = nil, secure = false, request) @set_cookies = {} @delete_cookies = {} @host = host |