This week in Rails
May 27 2018
Enumerable#index_with, transaction fixes, and more!
Hello everyone! This is
, with a roundup of the last two weeks of activity in the Rails world. Let's get started!
This Week's Contributors
In the last two weeks, Rails saw contributions from 29 people, including 10 first-time contributors. Thank you all!
If you'd like to be included here, why not check out the list of
This new method converts an enumerable to a hash, where the keys are the enumerable's elements and the values are determined by the provided block or argument.
Action Mailer now eager loads the mail gem
Loading the mail gem during boot avoids burdening the first request with the responsibility, and conveniently sidesteps a deadlock that the author encountered in their application.
Allow Range#=== and Range#cover? on Range
Active Support extends
to match other ranges, but a change to the native Ruby implementation broke it. This patch ensures that the behaviour will work on Ruby 2.6, and also adds it to
for good measure.
Speed up xor_byte_strings by 70%
The benchmark included with this performance patch shows that it saves a cool 5 microseconds whenever Rails generates a CSRF token. 🐎
Roll back parent transaction when children fail to save
If a record's associations contains valid but unsaveable data, it will now correctly fail to save and roll back its transaction.
Finalize transaction record state after real transaction
When a record was saved multiple times in the same transaction, its previous state wasn't always immediately restored if the transaction was later rolled back.
Disable foreign keys during alter_table for SQLite3 adapter
Tables that are referenced by foreign keys can now be successfully altered when using the SQLite3 adapter.
In related news,
Rails 6.0 will require a minimum SQLite version of 3.8.0
As always, there were many more changes to the Rails codebase than we can cover here - if you're interested, you can check out
the full listing of commits from the last two weeks
. Until next week!
This Week in Rails · 30 N Racine #200 · Chicago IL 60607 · USA
View in browser
Autumn is here, and so is Rails 7 Alpha 2! 🍂
Rails 7 alpha released
Bye-bye Byebug, Hello jsbundling and cssbundling!
Remove default reliance on Sass and more!
Good-bye classic mode, --skip-puma, --skip-gemfile.. hello weekday_options_for_select!
ESM importmap and Marginalia
Active Record goodies and more!
Favicons, InvalidAuthenticityToken message gains, Journey optimizations and more!
Active record improvements and much more
Performance and parallel testing improvements and more!