나는 다음과 같은 협회가 :두 개 이상의 테이블에서 '.includes'로 어떻게 쿼리합니까?
class Captain
has_many :boats
end
class Boat
belongs_to :captain
has_many :classifications
end
class Classification
has_many :boats
end
내가 함께 분류가 보트를 가지고있는 선장 알아 싶어 ". 뗏목"의 이름 속성을
이 지금까지 내 추측하고있다 : Captain.includes(:boats, :classifications).where(:boats => {:classifications => {:name => "catamaran"}})