-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[938] Conditional logic for filters #1801
[938] Conditional logic for filters #1801
Conversation
+ followed the way conditional procs are built for Scopes + by way of Array.group_by, we now only recognize the last-defined `filter` call for each individual attribute + update the specs to allow `filter` to be called multiple times on the same pseudo-document
Note that I updated this PR with tests, and found a much more robust way to add this functionality than what I had before. Bonus: if someone calls One more thing: I updated the unit tests to allow |
Agree, this functionality was submitted 6 months ago and still hasn't been merged in, but it looks like it would still be a clean merge as of this morning. |
@macfanatic to be fair, the original pull request was lacking test coverage and didn't follow the codebase's conventions. Though hopefully this gets merged in soon. |
[938] Conditional logic for filters
is this in the current version? conditional filter doenst work for me |
You need to use the latest version from github: # in your Gemfile
gem 'activeadmin', github: 'gregbell/active_admin' |
I can not use conditional filter, I'm using the master version. |
@lporras can you go into more detail? Can you provide an example that isn't working? |
ops, sorry it works, I just realize that my conditios was incorrect. |
Fixes longstanding Issue #938, replacing Pull Request #1452 which was never merged.