title: Possible to access nested table attributes in model?
body: <p>My database schema includes a model(Tasks) that has_one of 14 different types of hazards. For example here is a pseudo relational structure. </p>
  
  <pre><code>Task -&gt; has_one Biohazard
       -&gt; has_one Fallhazard
  </code></pre>
  
  <p>In the Task model I currently am trying to implement validation to determine when the forms for each of the hazards has been completed. The condition for this I want to use in my tasks model is as follows. </p>
  
  <pre><code>    if self.Biohazard.total &lt; 1000
         self.date_completed = Date.today
      end
  </code></pre>
  
  <p>I am currently getting the error "Undefined method" for this Biohazard.total. Is there a way to make that attribute accessible inside of the Task model? </p>