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

Properly permit array params #2

Merged
merged 2 commits into from Feb 15, 2017
Merged

Properly permit array params #2

merged 2 commits into from Feb 15, 2017

Conversation

blaedj
Copy link

@blaedj blaedj commented Feb 14, 2017

Permit array parameters in filterrific_params. With this change, you can filter
by multiple values from a select.
All credit goes to @patrocc6 for this, see
jhund#113 (comment)

Permit array parameters in filterrific_params. With this change, you can filter
by multiple values from a select.
All credit goes to [@patrocc6](github.com/patrocc6) for this, see
jhund#113 (comment)
@ayaman
Copy link
Owner

ayaman commented Feb 15, 2017

Thank you @blaedj and @patrocc6! My only comment is that the first check should be filterrific_params[p].is_a?(ActionController::Parameters) instead of filterrific_params[p].is_a?(Hash) because ActionController::Parameters doesn't inherit from Hash in Rails 5. If you can fix that I'll merge the pull request directly.

ActionController::Parameters no longer inherits from hash in rails 5
@blaedj
Copy link
Author

blaedj commented Feb 15, 2017

Ah yep good catch, I didn't notice because I was trying to fix a problem with array params.

@ayaman ayaman merged commit 292ecd9 into ayaman:master Feb 15, 2017
@ayaman
Copy link
Owner

ayaman commented Feb 15, 2017

Looks good, thank you again!

@blaedj
Copy link
Author

blaedj commented Feb 15, 2017

Awesome thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants