Let’s say I have a list of business objects listed in the array @businesses
I would like to find a list of employees that work at all the businesses listed in @businesses.
It seems that I can’t just do Employee.where(:business_id=>@businesses)
Is there a way to do the above that doesn’t involve code like
@businesses.each do |business|
business.employees
end
Maybe something like:
Or