title: undefined method `fields_for' for #<MyModel:0xc2f8da0>
body: <p>I have 3 level hierarchy in my models for e.g </p>
  
  <p>Publisher [have many] -> Author [have many] -> Book</p>
  
  <p>In My form, 
  I have the following structure</p>
  
  <pre><code>&lt;%= form_for(@publisher) do |p| %&gt; 
      ...
    &lt;%= p.fields_for @publisher.authors.build, :authors do |a| %&gt;
       ...
      &lt;%= a.fields_for a.books.build, :books do |b| %&gt;
        ...
      &lt;% end %&gt; 
    &lt;% end %&gt; 
  &lt;% end %&gt; 
  </code></pre>
  
  <p>It throws the following error </p>
  
  <pre><code>undefined method `fields_for' for #&lt;Author:0xc2f8da0&gt;
  </code></pre>
  
  <p>Any help would be much appreciated.</p>