I have a Product model that has_and_belongs_to_many :taxons, and I want to find all products that are in specific taxons.
Product
has_and_belongs_to_many :taxons
For example, if a pro
Assuming performance isn't a requirement:
a = Taxon.find_by_name!('Ruby on Rails').products.pluck(:id) b = Taxon.find_by_name!('Shirts').products.where(:id => a)