You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rails 8.1: jsonapi_resources DSL fails to generate relationship routes due to Resource#initialize signature change #1479
After upgrading to Rails 8.1.1, JSONAPI‑Resources fails to generate relationship routes.
Requests like:
raise:
RoutingError (No route matches ...)
even though the resource is declared with:
jsonapi_resources:deal_individuals
Cause
Rails 8.1 changed ActionDispatch::Routing::Mapper::Resources::Resource#initialize to require keyword args (only:, except:, **options). The JSONAPI‑Resources DSL still passes a positional options hash, so jsonapi_relationships never runs and relationship routes are missing.
Patch Location
lib/action_dispatch/routing/mapper/resources.rb (or an initializer monkey‑patch if overriding locally).
Sorry, our modificaitons are includes setting for Claude Code, Docker (docker compose). We are currently testing the modifications. Once testing is complete, we plan to create a PR with those excluded.
We've added explicit tests to verify that this issue is fixed in the speee fork.
Fix Location: The Rails 8.1 compatibility is already implemented in lib/jsonapi/routing_ext.rb:146-155 which handles the changed Resource.new signature.
Test Coverage: We added comprehensive routing tests to confirm relationship routes are automatically generated when using jsonapi_resources without an explicit block in Rails 8.1+:
Activity
takaokouji commentedon Nov 10, 2025
We try to fix it, so please try it: speee#1 .
Sorry, our modificaitons are includes setting for Claude Code, Docker (docker compose). We are currently testing the modifications. Once testing is complete, we plan to create a PR with those excluded.
Add Rails 8.1 compatibility tests for relationship routes
takaokouji commentedon Jan 21, 2026
We've added explicit tests to verify that this issue is fixed in the speee fork.
Fix Location: The Rails 8.1 compatibility is already implemented in
lib/jsonapi/routing_ext.rb:146-155which handles the changed Resource.new signature.Test Coverage: We added comprehensive routing tests to confirm relationship routes are automatically generated when using
jsonapi_resourceswithout an explicit block in Rails 8.1+:Test Results: All 37 routing tests pass on Rails 8.1.2, including the new tests specifically targeting this issue.
If you'd like to try the speee fork with Rails 8.1 support, please see:
Merge pull request #22 from speee/test/rails-8.1-relationship-routes