The Wire · Showcase
RAILS TIGHTENS UUID VALIDATION, OPENS API-ONLY STORAGE
By RepoJournal · Filed · About Rails
PostgreSQL adapter now rejects malformed UUIDs that Rails was silently fixing, while Active Storage gains flexibility for API-only applications.
The PostgreSQL adapter caught a subtle bug where trailing dashes in UUIDs were being stripped automatically, masking invalid data at the application layer [1]. This fix ensures User.find('a0eebc999c0b4ef8bb6d6bb9bd380a11-') raises NotFound as expected, closing a validation gap that could hide data integrity issues in production. Meanwhile, Active Storage's base controller is now configurable, letting API-only apps inherit from ActionController::API instead of the default ActionController::Base [2]—a small change with real implications for Rails apps serving only JSON. The role-switching API got a cleanup too, moving prevent_writes configuration to method parameters for clearer semantics [3]. Test infrastructure improvements continue across the framework with more activerecord tests adopting notification assertions [4], reducing boilerplate and making the test suite easier to maintain.
Action items
- → Upgrade Rails and audit UUID handling in your PostgreSQL queries—especially anywhere you're accepting user-provided identifiers rails/rails [plan]
- → If you're running an API-only Rails app with Active Storage, test the new base controller configuration in your staging environment rails/rails [monitor]
References
- [1] Reject trailing dash in PostgreSQL adapter rails/rails
- [2] Allow configuring Active Storage base controller parent class ↗ rails/rails
- [3] Move `prevent_writes` defaulting to params of role switching methods ↗ rails/rails
- [4] Simplify more `activerecord` tests with `NotificationAssertions` helpers ↗ rails/rails
FAQ
- What changed in Rails on May 9, 2026?
- PostgreSQL adapter now rejects malformed UUIDs that Rails was silently fixing, while Active Storage gains flexibility for API-only applications.
- What should Rails teams do about it?
- Upgrade Rails and audit UUID handling in your PostgreSQL queries—especially anywhere you're accepting user-provided identifiers • If you're running an API-only Rails app with Active Storage, test the new base controller configuration in your staging environment
- Which Rails repositories shipped on May 9, 2026?
- rails/rails