Skip to content

Add support for Rails 8+#26

Merged
justinhoward merged 4 commits intomainfrom
wl-AddRails8Support
Mar 20, 2026
Merged

Add support for Rails 8+#26
justinhoward merged 4 commits intomainfrom
wl-AddRails8Support

Conversation

@wpliao1989
Copy link
Collaborator

@wpliao1989 wpliao1989 commented Mar 18, 2026

Summary

  • Add Rails 8.0 and 8.1 to the CI matrix
  • Fix ActiveRecordSubscriber for Rails 8.1, which moved sql_runtime from a module-level accessor on ActiveRecord::RuntimeRegistry to a nested Stats object (RuntimeRegistry.stats.sql_runtime)
  • Fix redirect spec for Rails 8.1, which now logs a WARN for external redirects without allow_other_host: true
  • Fix CI version pinning: use three-segment versions (7.0.0 instead of 7.0) so that ~> constraints pin to the intended minor version
  • Bump version to 0.10.0

It was using Rails 7.2 for three 7.x test suites and 8.1 for both 8.x.
…tests

Rails 8.1 moved sql_runtime from a module-level accessor on
ActiveRecord::RuntimeRegistry to a nested Stats object
(rails/rails@7d12071). Handle both APIs so the subscriber works
on Rails <= 8.0 and >= 8.1.

Rails 8.1 also logs a WARN for external redirects without
allow_other_host: true, which shifted log indices in the redirect
spec. Pass the flag explicitly to suppress the warning.
@wpliao1989 wpliao1989 changed the title Add Rails 8+ to CI matrix Add support for Rails 8+ Mar 20, 2026
Copy link
Member

@justinhoward justinhoward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@justinhoward justinhoward merged commit 3f07f72 into main Mar 20, 2026
7 checks passed
@justinhoward justinhoward deleted the wl-AddRails8Support branch March 20, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants