stas / jsonapi.rb

Lightweight, simple and maintained JSON:API support for your next Ruby HTTP API.
MIT License
262 stars 58 forks source link

Fix specs with Ransack 4.0 #93

Closed mamhoff closed 1 year ago

mamhoff commented 1 year ago

What is the current behavior?

Ransack 4 requires explicitly allowlisting ransackable attributes and associations for each model. This causes the specs to fail with the most recent Ransack version. This fixes those spec failures.

What is the new behavior?

Specs will pass.

Checklist

Checklist doesn't apply as this is purely a fix for the test suite.

stas commented 1 year ago

Thank you @mamhoff and sorry for the late response.

stas commented 1 year ago

Ransack v4 / Ruby 7.1 support is broken until this is fixed https://github.com/activerecord-hackery/ransack/issues/1420