Repository navigation
Conversation
Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
|
LGTM, but can you look at the failing test? |
|
I checked the failed Ruby 2.7 / Rails 6.0.6 / PostgreSQL job. It ran 675 tests with 8,767 assertions and one failure: Both that test and its helper are byte-identical between the PR head I have not reproduced the failure with the matching Ruby/Rails/PostgreSQL setup, so the cause remains unverified. The next diagnostic is a base-versus-head run with seed |
All Submissions:
Bug fixes and Changes to Core Features:
Test Plan:
rake testneeds a database and currently errors out on a booted-app requirement inrails/test_helpthat's unrelated to this change (reproduces the same way on master with Rails 7.2 and 8.1, so it looks like a separate pre-existing gap in test_helper.rb's Rails 8 support). To verify this fix directly I installed actionpack 7.2.2.2 and 8.1.3.1 side by side and drew routes withjsonapi_resourcesthrough a realActionDispatch::Routing::RouteSet#draw, which is whattest/unit/routing_ext_test.rbdoes. That test errors with the exactArgumentError: wrong number of arguments (given 4, expected 3)from the issue when run against master, and passes on both Rails versions with this change.Reviewer Checklist:
Fixes #1488
Rails 8.1 changed
ActionDispatch::Routing::Mapper::Resource#initialize(andSingletonResource) to takeonly:/except:as keywords instead of a trailing positional options hash (rails/rails#53689).jsonapi_resource(s)still calls both with a plain positional hash, so drawing any route on Rails 8.1 raisesArgumentError: wrong number of arguments (given 4, expected 3)before the app boots. Passingoptionswith**instead of positionally works on both the old and the new signature.