title: how to display data from a associated model
body: <p>Currently stuck on a problem</p>
  
  <p>I have a <strong>company.rb</strong> model that <strong>has_many :applications</strong> </p>
  
  <p>The <strong>application.rb</strong> model <strong>belongs_to :company</strong> and <strong>has_many :answers</strong></p>
  
  <p>The <strong>answer.rb</strong> model <strong>belongs_to :application.rb</strong> and <strong>has_many :users</strong></p>
  
  <p>The <strong>user.rb</strong> model <strong>has_many :answers</strong></p>
  
  <p>I allow a company to create an application. There they can input questions. The user can view them and their answers will be stored in answer.rb. </p>
  
  <p>What I'm trying to do now is display all current_company.applications that have received an answer.</p>
  
  <p>I tried this:</p>
  
  <pre><code>&lt;% @applications.all.each do |f| %&gt;
  
  &lt;%= f.answers.answer_1 %&gt;&lt;br&gt;
  
  &lt;% end %&gt;
  </code></pre>
  
  <p>whilst having my controller:</p>
  
  <pre><code> def applicants
     @applications = current_company.applications
   end
  </code></pre>
  
  <p>however I get undefined method `answer_1'. It doesn't seem I'm available to access it. I store it like this:
  the applications has a company_id and the answers has an application_id and a user_id.</p>
  
  <p>I thought that by doing i the way I do now I'm able to access all applications created by the current company. From there I can view all application_id in the answers as those are the one's I'm outputting but it's not working. </p>