The Wire · Showcase
RAILS CLEANS UP DATABASE ADAPTER CRUFT, MARKS INSERT_RETURNING FOR REMOVAL
By RepoJournal · Filed · About Rails
Rails is deprecating the `insert_returning` option after it became redundant across multiple insert paths, while extracting hidden parameters and removing dead code across the database layer.
Ryuta Kamizono shipped a focused cleanup cycle: Rails now extracts `:table_name` as an explicit keyword argument in join table helpers [1], eliminating the silent mutation of options that was a necessary workaround before. The bigger move is deprecating the `:insert_returning` option and `use_insert_returning?` method [2], which became vestigial once `insert_all`, `upsert_all`, and UPDATE RETURNING all started respecting database capabilities directly. Separately, Kamizono removed the unused `binds` argument from `update_with_result` [3], dead weight carried since Arel began holding bind values itself. These are the kinds of cuts that don't break production but make the codebase breathe easier for the next maintainer. 16 commits and 8 PRs across rails/rails in this period.
One email a day. Unsubscribe in one click.
Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
References
- [1] Extract `:table_name` as explicit kwarg in join table helpers rails/rails
- [2] Deprecate `insert_returning` option and `use_insert_returning?` rails/rails
- [3] Remove unused `binds` argument from `update_with_result` rails/rails