Skip to content

fix: backport Rails 8.1 routing keywords to release-0-9 - #1497

Merged
bf4 merged 4 commits into
release-0-9from
codex/rails-8-1-routing-0-9
Oct 22, 2026
Merged

bf4 merged 4 commits into
release-0-9from
codex/rails-8-1-routing-0-9

Conversation

@barelyknown

@barelyknown barelyknown commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

On release-0-9, drawing plural or singleton JSONAPI routes under Rails 8.1 raised ArgumentError: wrong number of arguments (given 4, expected 3) in the Rails resource constructor. The routing calls also emitted positional-options deprecations.

Pass the existing options as keywords at all four routing calls. The regression tests cover plural and singleton route generation, controller options, and excluded actions.

The follow-up commits address separate CI issues:

  • Load logger before Rails test dependencies so the Rails 6.0 and 6.1 jobs boot with the currently resolved dependencies.
  • Assert paths using the configured route formatter so the new tests pass with the format active in older Rails jobs.

This maintenance-branch backport is related to #1496, which targets master. It does not include the broader compatibility changes in #1480.

Validation

  • Before the routing fix, both regression tests raised the constructor argument error on Rails 8.1.4 (Ruby 3.3.8).
  • After the routing fix, 2 tests and 9 assertions passed on each of Rails 7.0.8.7, 7.1.6, 7.2.4, and 8.1.4 (Ruby 3.3.8).
  • The focused routing tests pass locally after the CI fixes: 2 runs, 0 failures (Ruby 3.1.2, Rails 7.1.3).
  • GitHub Actions passes all 8 Ruby 2.6.6/2.7.2 and Rails 5.1–6.1 matrix jobs.

@kurko

kurko commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

lgtm but needs tests passing

end

resource @resource_type, options do
resource @resource_type, **options do

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👀 ruby2keywords

@bf4
bf4 merged commit bad9e0b into release-0-9 Oct 22, 2026
8 checks passed
@bf4
bf4 deleted the codex/rails-8-1-routing-0-9 branch October 22, 2026 01: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.

3 participants