Answer the question
In order to leave comments, you need to log in
How to change active record to fulfill double condition with joins?
I have such a query in ActiveRecord on my project, which returns categories based on the presence of providers in subcategories:
Category.joins(subcategories: [:service_providers]).uniq
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question