Hi guys,
I have a
class Foo
has_many :foo_bars
has_many :bars, :through => :foo_bars
end
What’s the simplest way to find all Foos that don’t have any Bars?
I know I could go through some convoluted process like finding all Foo
ids and
then finding all foo_ids from the foo_bars table and subtracting those,
but it
seems like there should be a simple query to do this. Any thoughts?
Thanks in advance