aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-rw-r--r--actionpack/lib/action_dispatch/middleware/cookies.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb
index 96bdf570af..9d94d94ffb 100644
--- a/actionpack/lib/action_dispatch/middleware/cookies.rb
+++ b/actionpack/lib/action_dispatch/middleware/cookies.rb
@@ -532,9 +532,13 @@ module ActionDispatch
if value
case
when needs_migration?(value)
- self[name] = Marshal.load(value)
+ Marshal.load(value).tap do |v|
+ self[name] = { value: v }
+ end
when rotate
- self[name] = serializer.load(value)
+ serializer.load(value).tap do |v|
+ self[name] = { value: v }
+ end
else
serializer.load(value)
end