title: Creating multiple nested forms using simple_form and rails 4
body: <p>I'm trying to create a simple app with the following models:
  categories --[has_many]--> questions --[has_many]--> answers</p>
  
  <p>I have the following code for creating categories + questions(categories/_form.haml.html):</p>
  
  <pre><code>= simple_form_for(@category) do |f|
    = f.error_notification
    = f.input :title, label: "Category title: "
    = f.simple_fields_for :questions, @category.questions.build do |q|
      = q.input :content, label: "Question content: "
    = f.button :submit
  </code></pre>
  
  <p>And I'm using all the same code for creating questions + answers(questions/_form.haml.html). I have all the relations, strong parameters, nested attrs and controllers configured, it works just fine for me.</p>
  
  <p>Two questions:</p>
  
  <ol>
  <li><p>How to create multiple questions in categories/_form.haml.html?</p></li>
  <li><p>How to create category + multiple questions + multiple answers per each question at once(in categories/_form.haml.html)?</p></li>
  </ol>
  
  <p>I've spent a few hours trying to figure out how to accomplish the second one and all the info I was able to find is related to Rails 3.0 and form_for. None of them worked for me.</p>
  
  <p>The most straightforward solution here should be something like:</p>
  
  <pre><code>= simple_form_for(@category) do |f|
    = f.error_notification
    = f.input :title, label: "Category title: "
    = f.simple_fields_for :questions, @category.questions.build do |q|
      = q.input :content, label: "Question content: "
      = q.simple_fields_for :answers, q.questions.build do |a|
        = a.input :content, label: "Answer content"
    = f.button :submit
  </code></pre>
  
  <p>But it gives me</p>
  
  <pre><code>undefined method `questions' for #&lt;SimpleForm::FormBuilder:
  </code></pre>
  
  <p>What am I missing here?</p>