title: Rails 5 Form: Loop through a collection to get a list of questions, but update a different Model
body: <p>I have two models:
  CompanyQuestion and UserAnswer</p>
  
  <p>CompanyQuestion has_many UserAnswers, and UserAnswers belongs_to CompanyQuestion</p>
  
  <p>CompanyQuestion has a :question attribute, "The person I'd most like to meet..."</p>
  
  <p>UserAnswer has :answer and :company_question_id attributes.</p>
  
  <p>On the User's profile, I'd like to loop through all the CompanyQuestions with textareas for the User to enter their answer and then submit their answers.</p>
  
  <p>===</p>
  
  <p>What's your favorite book?
  [ TEXTAREA ]</p>
  
  <p>Who is the most famous person you've met?
  [ TEXTAREA ]</p>
  
  <p>===</p>
  
  <p>I've accomplished the looping but I'm not sure how to configure the form helper to follow the Rails way of updating the UserAnswer models.</p>
  
  <pre><code>&lt;% @questions.each do |question| %&gt;
    &lt;%= form_for question do |form| %&gt;
        &lt;div class="form-group"&gt;
          &lt;%= form.label question.question %&gt;
          &lt;%= form.text_area ... %&gt;
        &lt;/div&gt;
    &lt;% end %&gt;
  &lt;% end %&gt;
  </code></pre>