Ruby on Rails: Composite Key Fixes and Documentation Updates
Rails merged three pull requests addressing composite foreign key touch behavior, form helper documentation, and test database cleanup. The changes focus on bug fixes and developer experience improvements.
Duration: PT1M48S
Transcript
Good morning, this is your Rails development briefing for Tuesday, May 25th, 2026.
Romulostorel merged a fix for touch_record functionality with composite foreign keys. The issue occurred when belongs_to associations with composite foreign keys and touch: true failed to update the old associated record's timestamp during foreign key changes. For example, when a book moved from one order to another, only the new order's updated_at field was touched, while the previous order was silently skipped. The fix spans four files with 77 additions and comprehensive test coverage.
Cgunther merged documentation improvements for options_from_collection_for_select helpers. The update clarifies that value_method and text_method arguments accept Proc objects in addition to string and symbol method names. This capability was previously available but undocumented, affecting both the main helper and its group collection variant.
Yahonda merged a test cleanup fix for bin_setup_test. The change ensures that PostgreSQL databases created during BinSetupTest are properly dropped after test completion. Previously, the app_development and app_test databases remained orphaned since teardown only removed the temporary app directory.
All three pull requests have corresponding merge commits in the main branch, indicating they've been fully integrated into the Rails codebase.
What's next: These fixes improve Rails' handling of composite primary keys, which have seen increased adoption. The documentation updates should reduce developer confusion around form helper capabilities.
That's your Rails update. We'll be back tomorrow with more developments from the Rails core team.