You should know that there are gotchas: while this works fine
:categories_id_eq
If you want to find products in any category, you can go with
:categories_id_in
But if you need to get products that belong to all selected categories, they will not work as expected:
:categories_id_all
returns null results in discussions:
Rails, Ransack: how to search for HABTM relationships for "all" "instead of" any "and" "
Convert habtm ActiveRecord request to Arel .
prikha
source share