Conversation
|
awesome! i actually put some more work into it, but wasn't able to do a proper PR: stas:master...easyPEP:feature/ransack-scopes i added a |
Scopes are special in that they don't have a predicate. This removes the check for the predicate, and thus makes scopes as filtering options work with JSONAPI.rb.
00aee90 to
e9dc2e4
Compare
|
@mamhoff @fluxsaas first of all, apologies for being super late on reviewing this one. I carried on the work that you've started and put it all together in the #57 Main reason why I moved it into an I'll be closing this and merging #57 if that's ok. Please continue the conversation in #57 |
What is the current behavior?
jsonapi.rb will filter out filtering terms that refer to a scope defined on the searchable model.
I've build on a fantastic failing spec by @fluxsaas - thank you!
What is the new behavior?
This allows the user of jsonapi.rb to specify scopes that are marked as ransackable on the resource being queried.
Scopes do not have a predicate, and this just removes the predicate check. No API changes, really.
Related PRs and issues
Should fix #42
Checklist
Please make sure the following requirements are complete:
features)