This week in Rails
May 28 2017
This Week in Rails: AS::CurrentAttributes, AEAD and more!
bringing you all the latest news about Rails from the hopefully ending
This Week's Rails contributors!
We had 36 people who helped make Rails better this week.
Six of them contributed for the first time ever!
If you would like to help out, check the
ActiveSupport::CurrentAttributes provides a thread-isolated attributes singleton
If you've used
you've already come across what
partly provides, but wait there's more!
you can start using per request variables that are accessible across the whole system like Models, Controllers, Views, during a Rails request cycle.
For example you can start using attributes like current_user, account, etc, and much more that your system might need without passing them all around to different methods.
AEAD encrypted cookies and sessions
which couples authentication and encryption in one faster step and produces shorter ciphertexts.
Older cookies encrypted using AES in CBC HMAC mode will be seamlessly upgraded when this new mode is enabled via the
Make `secrets:edit` run `secrets:setup` if it hasn't already.
On a new app, if you did
before you've called
, Rails would throw an error.
With this addition, Rails takes care of doing that for you if not already done.
Fix regression in Numericality validator
This change fixes a regression in
validator where extra decimal places on a user input for a decimal column were ignored by numerically validations, for example when comparing
Active Record initialization optimizations
Rails had a performance regression from 4.2x to 5.0 where initialization of records slowed down by factor of 2x in some cases.
This change optimizes initializations to improve by a factor of
2x for STI models
1.3x for non-STI models
That's it for this week, as always, we couldn't cover all of the changes, but feel free to check the
if you are interested.
Until next week!
This Week in Rails · 30 N Racine #200 · Chicago 60607 · United States of America