Conversation
added 2 commits
April 17, 2021 11:13
This is mostly a proof of concept of the new filtering structure
solebared
reviewed
Apr 22, 2021
Comment on lines
+13
to
+14
| ALLOWED_PARAMS = FILTER_CLASSES.each_with_object({}) do |filter, hash| | ||
| hash.merge! filter::ALLOWED_PARAMS |
Collaborator
There was a problem hiding this comment.
As i look at this, i'm wondering if we even need ALLOWED_PARAMS anymore? Since each filter will extract only the params it needs, maybe ContributionsController doesn't need to invoke strong_params at all? Perhaps that addresses some of the duplication you mentioned?
Collaborator
|
Looking great! Also curious your thoughts on my spike extracting serialization out of the filter, linked in this comment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
I wanted to try adding a filter now that we've refactored how filters work in #546
I also wanted to try @Exbinary's suggestion about a refactor to how parameters are passed around. I feel like this refactor is not yet complete — for example we might want to look into some of the duplication that now exists — but I felt this is a good point to stop and ask for feedback before going further
What
How
Testing
Next Steps
Outstanding Questions, Concerns and Other Notes
Accessibility
Security
Meta
Pre-Merge Checklist