Hi, it’s zzak. Hope everyone had a great holiday season and a happy new year! 🎊
Let’s explore this week’s changes in the Rails codebase.
Add Rails.app.revision
Add Rails.app.revision to provide a version identifier for error reporting, monitoring, cache keys, etc.
Add ActionDispatch::Request#bearer_token
Add ActionDispatch::Request#bearer_token to extract the bearer token from the Authorization header. Bearer tokens are commonly used for API and MCP requests.
Allow Rails.app.creds to access .env values in dev
In addition to ENV and the encrypted file, Rails.app.creds can now access values from .env files in development mode.
Fixed bin/rails notes command to work with CSS comments
This PR changes the comment lookup expression for bin/rails notes to correctly pick up CSS-style /* ... */ comments.
Add block support to ActionController::Parameters#merge
Now when merging params, you can provide a block to resolve conflicts between new and existing values, consistent with merge!.
Remove support for psych < 4
Active Support now requires Psych 4.0.0 or newer.
Deprecate built-in Sneakers adapter from Active Job
The “sneakers” gem has been moved to “kicks” gem, and as part of #52929 Rails is cleaning up old adapters from Active Job.
Make jobs enqueued after transaction commit by default
This PR changes the default behavior of Active Job for jobs enqueued inside an Active Record transacation to be deferred until after the transaction commits. This can be controlled by the previously deprecated config.active_job.enqueue_after_transaction_commit config, which is now un-deprecated.
You can view the whole list of changes here.
We had 24 contributors to the Rails codebase this past week!
Until next time!
Subscribe to get these updates mailed to you.