title: Problem find joined table in rails
body: <p>I have model represent association rule (Body => Head)</p>
  
  <pre><code>def Item
  has_many :heads
  has_many :bodies
  ...
  end
  
  def Rule
  has_many :heads
  has_many :bodies
  ...
  end
  
  def Body
  belongs_to :item
  belongs_to :rule
  ...
  end
  
  def Head
  belongs_to :item
  belongs_to :rule
  ...
  end
  </code></pre>
  
  <p>I want to find rule that have body's item matched items specified and want to access its head via Rule but I can't do like</p>
  
  <pre><code>def Rule
  has_many :heads
  has_many :bodies
  has_many :item, :through =&gt; :heads
  has_many :item, :through =&gt; :bodies
  ...
  end
  </code></pre>
  
  <p>What should I change and do to accomplish this ?</p>
  
  <p>Thanks,</p>