From 72889a6be4ec4afd68d3e4c3ae972099e080478a Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Sun, 6 Sep 2015 18:19:34 +0200 Subject: Push key_generator into SerializedCookieJars It's only used there. --- actionpack/lib/action_dispatch/middleware/cookies.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb index 0f316be681..b653e4eacd 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -226,10 +226,6 @@ module ActionDispatch def upgrade_legacy_signed_cookies? request.secret_token.present? && request.secret_key_base.present? end - - def key_generator - request.key_generator - end end # Passing the ActiveSupport::MessageEncryptor::NullSerializer downstream @@ -501,6 +497,10 @@ module ActionDispatch def digest request.cookies_digest || 'SHA1' end + + def key_generator + request.key_generator + end end class SignedCookieJar < AbstractCookieJar # :nodoc: -- cgit v1.2.3