aboutsummaryrefslogtreecommitdiffstats
path: root/railties/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'railties/CHANGELOG.md')
-rw-r--r--railties/CHANGELOG.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index dc753dbeac..85db9f62ed 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,4 +1,4 @@
-* Add `Application#message_verifier` method to return a application's message verifier.
+* Add `Application#message_verifier` method to return a message verifier.
This verifier can be used to generate and verify signed messages in the application.
@@ -6,6 +6,14 @@
Rails.application.message_verifier.verify(message)
# => 'my sensible data'
+ It is recommended to not use the same verifier to different things, so you can get different
+ verifiers passing the name argument.
+
+ message = Rails.application.message_verifier('cookies').generate('my sensible cookie data')
+
+ By default all the verifiers will share the same salt, so messages generates by one can be
+ verifier by another one.
+
See the `ActiveSupport::MessageVerifier` documentation to more information.
*Rafael Mendonça França*