The Wire · Showcase
RAILS DEPRECATES CREATE ALIAS AS API CLEANUP CONTINUES
By RepoJournal · Filed · About Rails
Rails is tightening its connection adapter API by deprecating the `create` method alias of `insert`, part of a broader push to align method names with their SQL equivalents.
The Rails team merged the deprecation of `create` as an alias for `insert` in connection adapters [1]. The method name confusion stems from `create` reading like DDL (as in `create_table`) when it actually performs an `INSERT` operation, creating unnecessary cognitive overhead for developers [2]. Meanwhile, Bootsnap shipped a critical SEGV fix that preserves Ruby's errinfo around instrumentation methods, addressing a crash condition in recent Ruby versions [3]. The framework also patched a LengthValidator bug where proc-based minimum constraints would crash with nil values [4], and fixed a routes reloader issue where `Rails::Application::RoutesReloader#execute` was reporting routes as unloaded even after drawing them completely [5]. The Rails website team updated sponsor logos as part of routine maintenance [6].
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
- → Update your code to call `insert` instead of `create` on connection adapters before Rails 8.0 rails/rails [plan]
- → Upgrade Bootsnap to pick up the errinfo SEGV fix if running recent Ruby versions rails/bootsnap [plan]
- → Monitor for LengthValidator changes if you use proc-based minimum constraints rails/rails [monitor]
References
- [1] Merge pull request #58426 from kamipo/deprecate_create_alias_of_insert rails/rails
- [2] Deprecate `create` alias of `insert` in connection adapters rails/rails
- [3] Merge pull request #564 from rwstauner/preserve-errinfo rails/bootsnap
- [4] Fix LengthValidator crash with proc minimum and nil value ↗ rails/rails
- [5] Mark the routes as loaded when the routes reloader runs standalone ↗ rails/rails
- [6] Updating a sponsor logo (#706) rails/website