This Week in Rails

September 6, 2024

Solid Cache and Queue as default backends and more

Hi, Wojtek here. Let’s explore this week’s changes in the Rails codebase.

Add Solid Cache
Solid Cache will be the new default caching backend for production deployments out of the box in Rails 8.

Add Solid Queue
Configure Solid Queue as the default Active Job backend alongside Solid Cache. Both can be skipped with "--skip-solid".

Allow registering test directories for code statistics
Make it easier for third party gems, to register test directories.

Silence healthcheck requests from the log
Add Rails::Rack::SilenceRequest middleware and use it via "config.silence_healthcheck_path = path" to silence requests to “/up”. This prevents the Kamal-required healthchecks from clogging up the production logs.

Fix authentication generator double signature
Previously the session id stored in the cookies was signed twice: with "cookies.signed" and "session.signed_id".

Update TimeWithZone inspect to match Ruby 1.9+ ISO 8601 format
This updates "TimeWithZone#inspect" to match the ISO 8601 style time which Ruby has used for "Time#inspect" since 1.9+. This makes TimeWithZone match Time’s formatting except for the precision in the timestamp and including the zone’s name. This only impacts #inspect method, as #to_s had already been updated to use the new ISO 8601 style formatting.

Update Rails Routing Guide
Reviewed version can be read on Edge Guides.

Update Active Record Associations Guide
Reviewed version can be read on Edge Guides.

You can view the whole list of changes here. We had 31 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.