1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

5 commits

Author SHA1 Message Date
Muhammad Usman
580eefe1bc
Fix AR signed IDs for STI models
Closes #40187.
2020-09-06 20:00:02 -04:00
Andrew White
9a97b1d62b
Make signed_id_verifier_secret lazily evaluated
The signed id feature introduced in #39313 can cause loading issues
since it may try to generate a key before the secret key base has
been set. To prevent this wrap the secret initialization in a lambda.
2020-05-28 19:00:41 +01:00
Ryuta Kamizono
c4682ead52 Fix "warning: instance variable @klass not initialized"
Follow up to #39404.
2020-05-27 00:25:20 +09:00
player1
277d637277
Take primay_key in count in ActiveRecord::SignedId (#39404)
Co-authored-by: Anton Topchii <player1@infinitevoid.net>
2020-05-23 14:36:06 -07:00
David Heinemeier Hansson
1a3dc42c17
Add signed ids to Active Record (#39313)
Add support for finding records based on signed ids, which are tamper-proof, verified ids that can be set to expire and scoped with a purpose. This is particularly useful for things like password reset or email verification, where you want the bearer of the signed id to be able to interact with the underlying record, but usually only within a certain time period.
2020-05-17 11:19:37 -07:00