This Week in Rails

December 22, 2023

This Week in Rails: bug report template changes, new test helpers and more!

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

Rails World 2024 updates
The venue, the sponsorship options, information about the CFP and the ticket costs were announced this week.

Fix inclusion of url_helpers module in concern
The dynamically generated url_helpers module is an ActiveSupport::Concern. Therefore, when it is included directly in another ActiveSupport::Concern, its included block is deferred until the latter concern is itself included elsewhere. Thus, in that case, the call to base._routes in def self.included(base) will raise NoMethodError because the included block will not yet have defined the _routes method.

Expose assert_queries_match and assert_no_queries_match assertions
Two more Active Record query related test assertions were made public. The new helpers can be used to test that the generated queries match or doesn’t match a regular expression.

Consolidate bug report templates and remove the gem versions
Before this change, two sets of bug report templates were kept in the Rails repository, but the only difference between them was the Rails version they were using. Since changing that is a single line change, there will be a single template for them from now.

Add actionview bug report template
This pull request introduces Action View bug report templates for contributors to reproduce issues with failing ActionView::TestCase instances.

Add webp and avif as allowed formats for active storage to serve inline webp and avif were added to the allowed content types for Active Storage to serve inline.

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