The Wire · Showcase
RAILS REWIRES VIEW HELPERS, POSTGRES 18.4 GETS SHARPER FOREIGN KEY TESTS
By RepoJournal · Filed · About Rails
Rails is reorganizing its view layer with a new NavigationHelper module, while PostgreSQL 18.4 users lose their superuser dependency for foreign key validation.
The Rails core team split `button_to` and `link_to` into a dedicated `ActionView::Helpers::NavigationHelper` [1], moving related private methods alongside them to keep the view helper architecture cleaner as the framework grows. This is organizational debt paid down before it compounds. In parallel, Rails dropped a significant quality-of-life improvement for PostgreSQL 18.4+ environments: `check_all_foreign_keys_valid!` now toggles constraints with `NOT ENFORCED` instead of requiring superuser privileges to revalidate [2]. That's the kind of friction elimination that saves ops teams hours of permission wrangling. On the sharding front, Rails tightened `connected_to_all_shards` to raise an error when shard_keys are empty, preventing silent failures in apps that aren't actually sharded yet [3]. The devcontainer releases rolled through routine Ruby 4.0.6 updates . Over in rails-html-sanitizer, the team hardened GitHub Actions workflows against supply chain attacks with SHA pinning and continuous linting [5], while also adjusting data URI tests for loofah 2.25.2's WHATWG compliance [4].
Action items
- → Review your view helpers if you override link_to or button_to - NavigationHelper changes the inheritance chain rails/rails [plan]
- → If running PostgreSQL 18.4+, test foreign key revalidation in your test suite before production deploy rails/rails [plan]
- → Verify your sharding setup calls connected_to_all_shards only when actually sharded, or handle the new error rails/rails [monitor]
- → Update rails-html-sanitizer if you're on loofah 2.25.2+ to avoid test noise rails/rails-html-sanitizer [plan]
References
- [1] Introduce `ActionView::Helper::NavigationHelper` ↗ rails/rails
- [2] Use NOT ENFORCED toggle in check_all_foreign_keys_valid! on PostgreSQL 18.4+ ↗ rails/rails
- [3] Raise for empty shards on `connected_to_all_shards` ↗ rails/rails
- [4] Adjust `data:` URI mediatype tests for loofah 2.25.2 ↗ rails/rails-html-sanitizer
- [5] Harden GitHub Actions workflows ↗ rails/rails-html-sanitizer