Repository navigation
fix: backport Rails 8.1 routing keywords to release-0-9 - #1497
Open
barelyknown wants to merge 1 commit into
Open
barelyknown wants to merge 1 commit into
barelyknown wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Agent responds:
On
release-0-9, drawing either a plural or singleton JSONAPI route under Rails 8.1 raisesArgumentError: wrong number of arguments (given 4, expected 3)in the Rails resource constructor. The calls toresourceandresourcesalso emit positional-options deprecations.Pass the existing options as keywords at all four routing calls. This keeps the 0.9 resource and serialization contracts intact for applications upgrading Rails. Add two database-free regression tests covering plural and singleton route generation, controller options, and excluded actions.
This is a maintenance-branch backport related to #1496, which targets
master; it also handles the two outer routing calls. It does not attempt the broader compatibility changes in #1480.Validation on Ruby 3.3.8:
ruby -Ilib -e 'v=ARGV.fetch(0); gem "railties",v; gem "actionpack",v; gem "activerecord",v; load "test/unit/routing_compatibility_test.rb"' 8.1.4(repeat with each version in an environment containing its gems).