title: Ruby On Rails - How to access a Child from its Parent?
body: <p>I'm struggling to find a way to access a child attribute from its' parent. I have these two models:</p>
  
  <pre><code>class SuspendedCompany &lt; ActiveRecord::Base
    has_many  :cases
  end
  
  
  class Case &lt; ActiveRecord::Base
    belongs_to :suspended_company
  end
  </code></pre>
  
  <p>I want to access Case's name from a SuspendedCompany. In my SuspendedComany controller I have tried a join like this:</p>
  
  <pre><code>@case = Case.joins(:suspended_company).where(...)
  </code></pre>