Rails Daily: Nested Through Preload Scope Fixes
Two merged fixes stop scoped nested through-associations from reusing wrong preloaded records, alongside a type-casting fix for pluck and grouped calculations on CTEs. Smaller reliability work covers Postgres unlogged tables, optimistic locking, and CI flakiness.
Duration: PT2M24S
Episode overview
This episode is a short developer briefing from Rails Daily.
It explains recent repository work in plain language.
- Show: Rails Daily
- Published: 2026-11-16T06:02:28Z
- Audio duration: PT2M24S
Transcript excerpt
This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.
Good morning, it's Monday, November 16th, 2026, and this is Rails Daily.
The headline is eager-loading correctness: two merged fixes stop scoped nested through associations from silently reusing the wrong preloaded records.
The first theme is that scope leak. One fix, in PR 59797, covers the case where the through or source is itself a through association or a join-table association, and a sibling association loads first. The sibling's records were reused without the scope, so you could get unfiltered results just because of load…
The second theme is result typing for queries the schema doesn't know. PR 59816 changes grouped calculations and pluck to fall back to the result column type when there's no schema entry, such as a joined subquery or common table expression. In practice, plucking a date from a joined subquery now returns a date…
Finally, smaller reliability work. Merged is PR 59809, which writes out query versus queries in the completed request log to avoid running the inflector on every request. In review are a per-table unlogged option for Postgres in PR 59815, useful for staging tables, caches and rate limiters, a fix in PR 59814 to keep…
What's next: watch those three…
Nearby episodes from Rails Daily
- Quiet Data Fixes and Thread Safety
- Association Fixes and Pool Leaks
- Association Integrity Fixes and Postgres Schema Cleanup
- Weekly Recap - Active Record Correctness and Performance
- Hot-Path Performance and Isolation Fixes
- Security Hardening and Query Fixes
- Silent Query Fixes, Forgery Gaps, and Upgrade Safety
- Active Record Array Storage and Security Hardening Push