RepoJournal
Rails

@rails

Ruby on Rails - Shopify, Basecamp, GitHub all run on it

Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

One email a day. Unsubscribe in one click.

Pick a date

Topics: Ruby Full archive →

The Wire · Showcase

Rails Fixes Composite Foreign Key Touch Bug, Solid Cable Drops Ruby 3.1

By RepoJournal · Filed · About Rails

Rails patched a silent failure in composite foreign key associations where touch: true would skip updating the old record when relationships changed.

The composite foreign key fix [1] [2] addresses a real production problem: when a belongs_to with touch: true and composite keys changed targets, only the new associated record got its updated_at timestamp. The old one was silently skipped because the touch_record method was doing a hash lookup with the entire array as key, but saved_changes tracks individual column names. Now each column is checked individually to reconstruct the old composite key. This is a solid catch for anyone using composite foreign keys in associations [3]. Separately, Rails test infrastructure improved with better database cleanup after bin/setup tests [4] [5], preventing stale app_development and app_test databases from polluting the test environment. On the Solid Cable desk, v4.0.0 shipped with breaking changes: Ruby 3.1 and 3.2 support dropped [6], and the library now eagerly initializes last_id to avoid skipping messages on reconnection [6]. If you're running Solid Cable on Ruby 3.1 or 3.2, you're locked to v3.x.

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] Merge pull request #57158 from romulostorel/fix-composite-fk-touch-record rails/rails
  2. [2] Fix touching records via composite foreign keys rails/rails
  3. [3] Fix touch_record for composite foreign keys ↗ rails/rails
  4. [4] Merge pull request #57457 from yahonda/yahonda/railties-bin-setup-test-db-cleanup rails/rails
  5. [5] Drop generated app databases after `test_bin_setup_output` rails/rails
  6. [6] v4.0.0 ↗ rails/solid_cable

Quick answers

What shipped in Rails on May 25, 2026?
Rails patched a silent failure in composite foreign key associations where touch: true would skip updating the old record when relationships changed. In total, 10 commits, 5 pull requests, and 1 releases landed.
Who contributed to Rails on May 25, 2026?
1 developer shipped this update, including romulostorel.
What were the notable Rails updates?
Merge pull request #57158 from romulostorel/fix-composite-fk-touch-record, Fix touching records via composite foreign keys, and Fix touch_record for composite foreign keys.

More from @rails

Daily updates, in your inbox

Follow Rails

Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?