This week in Rails
Sep 2 2018
Read replica database configurations, faster parameter filtering, and more!
Hello everyone! This is
, bringing you the highlights from the last week of activity in the
Add hooks to Active Job on retries and discards
Your application can now subscribe to be notified whenever a job is retried or discarded. Neat!
Support read replica database configurations
Database configurations can now be flagged as "replicas", indicating that the database they connect to is read-only.
For now this just means they're ignored by database tasks like
, but the comments on the pull request mention some other features that could be built on top of this change.
Reduce allocations during parameter filtering
Initially this patch looked like a micro-optimisation, but the author produced a benchmark which demonstrated saving 1% of both memory and time on a real world Rails app.
Find inverse associations with plural names
Previously, inverse associations would only be detected when they matched the model name exactly. Now, the case where they use the plural form of the model name will work too.
Clear mutation tracker after yielding in around callbacks
This change ensures that a record's view of the database is up to date immediately after an around callback yields, just as it would be in an after callback.
contributed to Rails this week; feel free to check out the
full list of changes
. If you want help out, maybe look for an interesting
Until next time!
This Week in Rails · 30 N Racine #200 · Chicago IL 60607 · USA
View in browser