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 hardens CurrentAttributes isolation, ships composite key value object

By RepoJournal · Filed · About Rails

A critical fix prevents request state leakage in CurrentAttributes, while new composite key infrastructure consolidates scattered logic across the ORM.

Rails plugged a dangerous isolation hole in CurrentAttributes by rejecting :attributes as a declared attribute name [1]. Declaring an attribute with that name shadowed the internal reader/writer that reset() relies on, causing per-request state to leak across requests. The INVALID_ATTRIBUTE_NAMES denylist had caught most problematic names, but :attributes slipped through. This ships as a safeguard against subtle, production-grade state corruption bugs.

On the composite key front, Rails introduced ActiveRecord::PrimaryKey, a value object that ends the scattered `is_a?(Array)` checks littering finders, relations, associations, and counter cache logic [2]. Each site was rebuilding where hashes, type casts, and primary key inference independently. The value object encapsulates the single-column vs. composite distinction behind a clean interface (`composite?`, `col`), with follow-up commits applying it across remaining branches [4] [5].

Rails is also laying groundwork for Ractor safety by introducing a preparation mechanism for applications to make their procs shareable [3]. This addresses edge cases where application code prevents Rails from automatically making procs Ractor-safe, which will matter as concurrency tooling matures.

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] Reject attribute names that shadow CurrentAttributes methods rails/rails
  2. [2] Introduce ActiveRecord::PrimaryKey value object for composite keys rails/rails
  3. [3] Introduce a new mechanism for applications to prepare for ractor safety ↗ rails/rails
  4. [4] Refactor Composite Primary Key implementation by using polymorphism ↗ rails/rails
  5. [5] Apply PrimaryKey value object to remaining composite-key branches rails/rails

Quick answers

What shipped in Rails on June 12, 2026?
A critical fix prevents request state leakage in CurrentAttributes, while new composite key infrastructure consolidates scattered logic across the ORM. In total, 25 commits and 10 pull requests landed.
Who contributed to Rails on June 12, 2026?
2 developers shipped this update, including Edouard-chin and paracycle.
What were the notable Rails updates?
Reject attribute names that shadow CurrentAttributes methods, Introduce ActiveRecord::PrimaryKey value object for composite keys, and Introduce a new mechanism for applications to prepare for ractor safety.

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?

We use privacy-friendly analytics (Google Analytics, IP-anonymized) to see which pages help readers. No ads, and we never sell your data. See our Privacy Policy.