I've got three tables:
In my building model I have "belongs_to :site" and in my equipment
model I have "belongs_to :building".
How do I find all pieces of equipment that belong to a particular
I tried something like Equipment.find(:all, :include =>
[ :building, :site ], :conditions => 'customer_id = 1'), but of course
that doesn't work because there's nothing about :site in the equipment
model. I also tried to put ":include => :site" in the "belongs_to" in
the building model, but I got an error saying that the association
named ":site" wasn't found.