This Week in Rails

April 25, 2025

Continuously improving the framework

Hi, it’s Claudio Baccigalupo. Let’s explore this week’s changes in the Rails codebase.

Add –reset option to bin/setup
Makes it easier to zero out a database and load seeds during development.

Add assert_in_body/assert_not_in_body
Lets test checking a response body for a piece of text without going through DOM manipulation.

Add a load hook for ActiveRecord::DatabaseConfigurations
Offers a way to use an initializer to register a database config handler before database tasks were defined.

Ensure all railties tests require strict_warnings
Prevents warnings from getting merged without being notified about them.

Sort schema cache columns and indexes per table in the cache file
Completes the work to make sure the content of db/schema_cache.yml has a stable order where tables, columns, and indexes are sorted by name.

Pass existing connection to #arel in #to_sql
Improves the performance of update_all and delete_all queries that include GROUP BY or HAVING.

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