i have a product model and a product category model. and theres a habtm between those.
i have categories like 'men' and 'jeans' and i would like to filter these. to do a filter on men is no problem but i need to filter multiple parameters (men and jeans). i tried some variations but i'm stuck on this.
this is what i have so far..
Product.joins(:product_categories).where(['product_categories.id = 5 and product_categories.id = 6'])
thanks for your time!