Skip to content

Fix for Rails 8.1 - updating the Resource instantiation with the latest API changes#10

Merged
dasunpubudumal merged 16 commits intomasterfrom
rails-8.1-fix
Jan 26, 2026
Merged

Fix for Rails 8.1 - updating the Resource instantiation with the latest API changes#10
dasunpubudumal merged 16 commits intomasterfrom
rails-8.1-fix

Conversation

@dasunpubudumal
Copy link

@dasunpubudumal dasunpubudumal commented Jan 26, 2026

Upgraded to fit Rails 8.1.

Inside the jsonapi_resources block, there's a call to a Resource class (which translates into a Rails resource) that Rails 8.1 doesn't like. Its API has been updated to accept only 3 arguments whereas we give 4 in jsonapi-resources (due to a destructured hash).

Resource.new(@resource_type, api_only?, @scope[:shallow], options)
Screenshot 2026-01-26 at 12 50 53 pm

This will be used in Traction Rails 8.1.

@dasunpubudumal dasunpubudumal changed the title Rails 8.1 fix Possible Rails 8.1 fix Jan 26, 2026
@dasunpubudumal dasunpubudumal self-assigned this Jan 26, 2026
@dasunpubudumal dasunpubudumal changed the title Possible Rails 8.1 fix Rails 8.1 fix Jan 26, 2026
@dasunpubudumal dasunpubudumal requested review from BenTopping and harrietc52 and removed request for harrietc52 January 26, 2026 13:28
@dasunpubudumal dasunpubudumal changed the title Rails 8.1 fix Fix for Rails 8.1 - updating the Resource instantiation with the latest API changes Jan 26, 2026
@harrietc52
Copy link

Can’t help but think, as a new “Process Improvement”, that this bug will get us in other apps, it it would be nice to have a almost list/ table of the Gem/ Version/ Error/ Fix so that when this fix is required for other apps, effort isn’t duplicated.

@dasunpubudumal dasunpubudumal merged commit e247112 into master Jan 26, 2026
9 checks passed
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