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
Defaults to "main" branch name, new webpacker guide and improved strict loading
Hello 2021: Sole record, Same form multiple verbs, Validator with range, Rich text control
Rails 6.1, benchmark anywhere, bugfixes and more!
Rails 6.1 RC2 and some enhancements
New Active Record and Action View capabilities, bug fixes and more!
Bugfixes, improvements and more!
Enhanced strict loading, multiple databases and more!
Multiple database improvements, bugfixes and more!
Active Record values_at and cache improvements
New API Docs site, configurable cache coder, bug fixes, and more!