Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnderscoreParameters plug underscore filters only in params map and not in jsonapi_query assign. #244

Closed
CostantiniMatteo opened this issue Mar 11, 2021 · 2 comments

Comments

@CostantiniMatteo
Copy link
Contributor

Hi, I've noticed that using UnderscoreParameters acts inconsistently with filters. For example, the following request:

http://localhost/api/comments?filter[userId]=123

corresponds, in the controller, to the following params:

%{"filters" => %{"user_id" => 123}}

which is the expected behaviour.

However, the filter keyword list in jsonapi_query contains the non-underscored version of the parameters:

%{filter: [userId: 123]}

I would like to know if this is the expected behaviour or not, and whether a PR to consistently underscore filters is welcome.

Copy link
Contributor

This issue has been automatically marked as "stale:discard". We are sorry that we haven't been able to prioritize it yet.
If this issue still relevant, please leave any comment if you have any new additional information that helps to solve this issue. We encourage you to create a pull request, if you can. We are happy to help you with that.

Copy link
Contributor

Closing this issue after a prolonged period of inactivity. If this issue is still relevant, feel free to re-open the issue. Thank you!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant