$ the-wire · showcase
Rails confines the collection buffer to ERB, fixing empty partials
By RepoJournal · Filed · About Rails · Composed from the cited sources · methodology
Rails' single shared collection buffer now applies only to ERB templates, restoring rendering for collection partials in other handlers, alongside memory and performance work on generated attribute readers and two PostgreSQL search_path fixes.
Share a collection buffer only between ERB templates rails/rails
Template#render drops a template's return value when handed a buffer, so only ERB's compiled templates could append to the shared collection buffer; every other handler lost its items. html and raw partials rendered as a collection came back empty, and jb partials, which return a Hash per item, produced no bodies.
Extract missing_attribute from generated reader rails/rails
The missing_attribute block moves out of the generated reader into a commonly used method, joining read_attribute, read_attr, and _read_attribute as a new _read_attribute! that raises on a missing name. The commit reports memory and performance gains for generated readers and uses rescue rather than an inline block for the raise path.
Disable triggers of tables shadowed on the PostgreSQL search path rails/rails
On PostgreSQL before 18.4, disable_referential_integrity falls back to DISABLE TRIGGER ALL on the bare names connection.tables returns, which resolve through search_path to the first matching table. The shadowed table keeps its triggers enabled while the earlier one is disabled twice, so fixtures around it are not actually shielded.
Truncate tables shadowed on the PostgreSQL search path rails/rails
db:truncate_all and the reset of parallel test databases share the same bare-name resolution and leave a table untouched when a same-named table sits earlier on the PostgreSQL search_path. Both truncate what connection.tables returns, so the shadowed table survives the truncation.
Disable triggers of tables shadowed on the PostgreSQL search path rails/rails
The commit for the trigger fix draws the same conclusion as the pull request: the first same-named table is caught twice and the shadowed one is missed entirely, which is why this needs resolving before fixtures run against a multi-schema search path.