mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
✂️ trailing spaces [ci skip]
This commit is contained in:
parent
a061d9012f
commit
a2a861d357
2 changed files with 11 additions and 9 deletions
|
@ -1,22 +1,22 @@
|
||||||
* Add support for finding records based on signed ids, which are tamper-proof, verified ids that can be
|
* 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
|
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
|
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.
|
underlying record, but usually only within a certain time period.
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
signed_id = User.first.signed_id expires_in: 15.minutes, purpose: :password_reset
|
signed_id = User.first.signed_id expires_in: 15.minutes, purpose: :password_reset
|
||||||
|
|
||||||
User.find_signed signed_id # => nil, since the purpose does not match
|
User.find_signed signed_id # => nil, since the purpose does not match
|
||||||
|
|
||||||
travel 16.minutes
|
travel 16.minutes
|
||||||
User.find_signed signed_id, purpose: :password_reset # => nil, since the signed id has expired
|
User.find_signed signed_id, purpose: :password_reset # => nil, since the signed id has expired
|
||||||
|
|
||||||
travel_back
|
travel_back
|
||||||
User.find_signed signed_id, purpose: :password_reset # => User.first
|
User.find_signed signed_id, purpose: :password_reset # => User.first
|
||||||
|
|
||||||
User.find_signed! "bad data" # => ActiveSupport::MessageVerifier::InvalidSignature
|
User.find_signed! "bad data" # => ActiveSupport::MessageVerifier::InvalidSignature
|
||||||
```
|
```
|
||||||
|
|
||||||
*DHH*
|
*DHH*
|
||||||
|
|
||||||
* Support `ALGORITHM = INSTANT` DDL option for index operations on MySQL.
|
* Support `ALGORITHM = INSTANT` DDL option for index operations on MySQL.
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
* Add default ENV variable option with BACKTRACE to turn off backtrace cleaning when debugging framework code in the
|
* Add default ENV variable option with BACKTRACE to turn off backtrace cleaning when debugging framework code in the
|
||||||
generated config/initializers/backtrace_silencers.rb.
|
generated config/initializers/backtrace_silencers.rb.
|
||||||
|
|
||||||
`BACKTRACE=1 ./bin/rails runner "MyClass.perform"`
|
`BACKTRACE=1 ./bin/rails runner "MyClass.perform"`
|
||||||
|
|
||||||
|
*DHH*
|
||||||
|
|
||||||
* The autoloading guide for Zeitwerk mode documents how to autoload classes
|
* The autoloading guide for Zeitwerk mode documents how to autoload classes
|
||||||
during application boot in a safe way.
|
during application boot in a safe way.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue