The Wire · Showcase
RAILS FIXES ATTACHMENT PURGE BUG, EXPANDS RENDER_IN FLEXIBILITY
By RepoJournal · Filed · About Rails
Rails shipped a critical fix for dependent: :purge that was detaching instead of purging attachments — and simultaneously expanded the render_in API to accept locals and blocks.
The attachment purge fix [1] corrects unexpected behavior where has_one_attached and has_many_attached with dependent: :purge would detach records instead of purging them on destroy. This is a behavioral bug fix that changes production behavior — review your attachment cleanup patterns. On the view layer, Rails now passes render options and blocks through to #render_in calls [2], extending support for Greeting and similar renderable objects to accept locals and custom blocks at the call site. Separately, the test infrastructure is getting a cleanup pass: Arel tests are being rewritten away from Minitest::Spec syntax [3] to reduce the spec dialect maintenance burden going forward. On the tooling side, devcontainer now defaults to postgres-client-17 [4] when building against Debian Trixie, and rails-html-sanitizer cut its gem package size 43% by excluding test files [5], dropping from 28K to 16K. Bootsnap fixed a method leak in Object during Parse.y testing [6], and the Rails website documentation saw minor banner updates [7]. All of these are steady-state improvements with no breaking changes for most deployments.
Action items
- → Audit your dependent: :purge usage — verify attachments are actually purging, not just detaching rails/rails [plan]
- → Test render_in calls with locals and blocks if you use custom renderable objects rails/rails [monitor]
- → Update devcontainer to feature_postgres-client_1.2.0 for Postgres 17 client support rails/devcontainer [monitor]
References
- [1] Fix unexpected behavior for dependent: :purge ↗ rails/rails
- [2] Pass render options and block to calls to `#render_in` ↗ rails/rails
- [3] Rewrite Arel tests using `ActiveSupport::TestCase` instead of `Minitest::Spec` ↗ rails/rails
- [4] feature_postgres-client_1.2.0 ↗ rails/devcontainer
- [5] Reduce gem size by excluding test files ↗ rails/rails-html-sanitizer
- [6] Avoid leaking a method in Object when testing for Parse.y bugs rails/bootsnap
- [7] Update banner.html rails/website
FAQ
- What changed in Rails on May 12, 2026?
- Rails shipped a critical fix for dependent: :purge that was detaching instead of purging attachments — and simultaneously expanded the render_in API to accept locals and blocks.
- What should Rails teams do about it?
- Audit your dependent: :purge usage — verify attachments are actually purging, not just detaching • Test render_in calls with locals and blocks if you use custom renderable objects • Update devcontainer to feature_postgres-client_1.2.0 for Postgres 17 client support
- Which Rails repositories shipped on May 12, 2026?
- rails/rails, rails/devcontainer, rails/rails-html-sanitizer, rails/bootsnap, rails/website