The Wire · Showcase
Rails deprecates Relation#uniq! as Marcel overhauls MIME detection
By RepoJournal · Filed · About Rails
Rails is cleaning house on legacy ActiveRecord methods while Marcel rewires MIME type handling from the ground up.
Rails deprecated `ActiveRecord::Relation#uniq!` [1], a method that has been redundant since 7.0's automatic deduplication, and removed the internal `true`/`false` options from the `ImmutableString` API docs [2]. Meanwhile, solid_queue fixed a shutdown race where TERM signals sent during boot were dropped, leaving workers claiming jobs until SIGKILL [3], and now ensures terminated forks get replaced even if the database is down [4]. Marcel's new TYPE_ALIASES map [5] resolves 152 aliases so `application/javascript` correctly returns as `text/javascript`. The CR2 detection bug [6] is also fixed: "image/tiff probed at index 23 while the CR2 matcher sat at 125 and never won." SQLite schema reads get batched for faster introspection [7], and solid_cable dropped a now-unnecessary channel index [8].
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
- → Remove usage of `ActiveRecord::Relation#uniq!` from your codebase rails/rails [plan]
- → Upgrade solid_queue to include the TERM handling fix rails/solid_queue [immediate]
- → Review Marcel detection behavior for alias and CR2 changes rails/marcel [plan]
References
- [1] Deprecate `ActiveRecord::Relation#uniq!` rails/rails
- [2] Remove `true:` / `false:` options from `ImmutableString` API doc rails/rails
- [3] Honour TERM received during supervisor boot before forking workers ↗ rails/solid_queue
- [4] Replace terminated forks even if releasing their claimed jobs fails ↗ rails/solid_queue
- [5] Respect MIME type aliases ↗ rails/marcel
- [6] Probe common magic types within their priority band ↗ rails/marcel
- [7] Read the table options of many tables at once, and batch the SQLite readers ↗ rails/rails
- [8] Remove channel index since we use channel_hash now rails/solid_cable