I'm looking to make a filter on my admin page for a user to show users who have both Subject_A and Subject_B.
Using the following line of code I've been able to filter for the users who have either Subject_A or Subject_B or both.
filter :universities, as: :select, multiple: true
Is there a way to create a filter using Active Admin to filter for users that only have both Subject_A and Subject_B?
multiple: true
never worked for me. The following did however:
filter :section, label: 'Category',
as: :select, input_html: { multiple: true },
collection: User.categories
You can try this:
filter :universities_and_universities, as: :select, multiple: true
This is not the perfect solution but it should works fine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With