Skip to content

Commit af74fc6

Browse files
authored
Merge pull request rails#52793 from lwassermann/patch-1
[ci skip] Fix a documentation name mismatch in cookies.rb
2 parents caa0b51 + 66b5345 commit af74fc6

File tree

1 file changed

+4
-2
lines changed
  • actionpack/lib/action_dispatch/middleware

1 file changed

+4
-2
lines changed

actionpack/lib/action_dispatch/middleware/cookies.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,15 @@ def use_cookies_with_metadata
116116
# cookies[:login] = { value: "XJ-122", expires: Time.utc(2020, 10, 15, 5) }
117117
#
118118
# # Sets a signed cookie, which prevents users from tampering with its value.
119-
# # It can be read using the signed method `cookies.signed[:name]`
120119
# cookies.signed[:user_id] = current_user.id
120+
# # It can be read using the signed method.
121+
# cookies.signed[:user_id] # => 123
121122
#
122123
# # Sets an encrypted cookie value before sending it to the client which
123124
# # prevent users from reading and tampering with its value.
124-
# # It can be read using the encrypted method `cookies.encrypted[:name]`
125125
# cookies.encrypted[:discount] = 45
126+
# # It can be read using the encrypted method.
127+
# cookies.encrypted[:discount] # => 45
126128
#
127129
# # Sets a "permanent" cookie (which expires in 20 years from now).
128130
# cookies.permanent[:login] = "XJ-122"

0 commit comments

Comments
 (0)