This Week in Rails

February 17, 2023

This Week in Rails: preloading associations with composite keys and more!

Hi, this is Greg, bringing you this week’s changes in the Rails codebase.

Support preloading associations with composite keys
This pull request adds support for Associations::Preloader to be able to preload associations associated by a composite foreign key (query_constraints) and by implication adds support for includes() relations.

SchemaCache#init_with skip deduplicate if specified
This is a very advanced API for people who use a custom Schema Cache serializer, and since the custom serializer might already deduplicate data, in which case going through deduplication again would be very wasteful.

Rename Dockerfile user to “rails”
While a tiny detail, this change lets anyone know who is using this container that they are in a “rails” image, as opposed to a generic “appuser” which may conflict with other images.

Add rake task to vendor guide javascript
The Rails guides were migrated from Turbolinks to Turbo, and this commit adds a rake task to automate the process of grabbing the turbo js file using Importmap::Packager, which is what importmap-rails uses for bin/importmap pin –download.

You can view the whole list of changes here.
We had 30 contributors to the Rails codebase this past week!

Until next time!

About This Week in Rails

Your weekly inside scoop of interesting commits, pull requests and more from Rails.