Hey everyone, Happy Weekend!
Vipul here with the latest updates for This Week in Rails. Let's dive in.
Vipul here with the latest updates for This Week in Rails. Let's dive in.
Rails guides gets a facelift
Rails guides has a received a big design update! Check out the Edge Guides to see these changes. If you find a bug or wish to submit a suggestion, you can open a discussion on GitHub. This also marks the beginning of trying out GitHub discussions, alongside the current Forum
Two new official gems
Solid Queue, a DB-based queuing backend for Active Job, has graduated to an official Rails gem.
Same for Mission Control — Jobs, which provides a Rails-based frontend to Active Job adapters. It currently supports Resque and Solid Queue.
Don’t enqueue jobs to process a preview image if no variant requires it
This PR fixes that previewable attachments that don’t specify any variants or no variants that require pre-processing, were still trying to queue a job to process the preview image anyways.
Eliminate remaining uses of lease_connection inside Active Record
Part of moving towards adding a new config.active_record.permanent_connection_checkout setting, this change eliminates the remaining uses of lease_connection inside Active Record API.
Do not build View Watcher until the first updated? check
Currently initialization of every Rails::Engine leads to the creation of a new View watcher when the engine prepends its paths. This contributes to the time it takes to perform the first cold request on a lazy loaded application. This change delays the initialization of the View watcher until its first usage to only have one initialization of the watcher.
Currently initialization of every Rails::Engine leads to the creation of a new View watcher when the engine prepends its paths. This contributes to the time it takes to perform the first cold request on a lazy loaded application. This change delays the initialization of the View watcher until its first usage to only have one initialization of the watcher.
Allow primary_key: association option to be composite
Association’s primary_key can be composite when derived from associated class’s primary_key or query_constraints. Rails dint allow setting this explicitly even though it was already capable of supporting it.
Association’s primary_key can be composite when derived from associated class’s primary_key or query_constraints. Rails dint allow setting this explicitly even though it was already capable of supporting it.
This commit allows primary_key association option to be an array to support this behavior.
You can view the whole list of changes here.
We had 14 contributors to the Rails codebase this past week!
We had 14 contributors to the Rails codebase this past week!
Until next time!