Friday, June 12, 2026

This Week in Rails: June 12, 2026

Posted by Greg

Hi, it’s Greg, bringing you this week’s changes in the Rails codebase.

Fix increment! with explicit query constraints
This pull request fix increment! / decrement! on models with query constraints to include every query constraint column in the counter update.

self.class.update_counters(id, attribute => change, touch: touch) 

Support a single composite primary key id in delete
This change aligns the class level delete method with destroy and now they both accept a single ID of a composite primary key.

Return an empty array from find([]) on a composite primary key
With this fix, Model.find([]) returns [] for a model with a composite primary key, the same as it does with a single primary key.

Introduce a new mechanism for applications to prepare for ractor safety
This pull request introduces a way for applications to know whether all procs passed to Rails API are ractors safe. It’s opt-in by default and include 3 modes:

  • :raise -> Rails attempt to make the proc shareable. It it’s not, a loud Ractor::IsolationError will be raised.
  • :warn -> We attempt to make the proc shareable. If it’s not, we rescue Ractor::IsolationError and output a warning.
  • nil -> We do not attempt to make the proc shareable.

Allow insert! to accept the :unique_by option
insert! now accepts the :unique_by option, consistent with insert.

Make rails new work again on systems that do not have vips
rails new was broken on Rails main if you do not have vips, but developers running rails new are not expected to have vips installed, especially if they are not using Active Storage. This change fixes the generator to work even when vips is not installed.

Fix update_all / delete_all ignoring group/having (updates/deletes every row)
This change fixes the issue of update_all / delete_all ignoring group and having, updating or deleting every row in the table instead of only the rows that satisfy the HAVING clause.

Updated Active Job Basics guide
As part of the Rails Foundation documentation project, the Active Job Basics guide received a big update.

Support only: and except: on _deliver callbacks in Action Mailer
This pull request adds support for config.action_mailer.raise_on_missing_callback_actions when using _deliver callbacks with only: and except: options.

You can view the whole list of changes here.
We had 39 contributors to the Rails codebase this past week!

Until next time!

Subscribe to get these updates mailed to you.