title: Why is my @results Quiz object nil?
body: <p>I pass the following to the <code>results/index.html.erb</code> view:     </p>
  
  <pre><code> def create
          @results = Quiz.where(user_id: current_user.id)
              redirect_to results_path
      end
  </code></pre>
  
  <p>(I've changed the above action BACK to create).</p>
  
  <p>Then, in my <code>results/index.html.erb</code> view:  </p>
  
  <pre><code>&lt;div class="container"&gt;
        &lt;!-- Example row of columns --&gt;
        &lt;div class="row"&gt;
          &lt;h1&gt;Results page&lt;/h1&gt;
          &lt;div class="col-md-12"&gt;
            &lt;p&gt;Eventually a user's results will appear here...&lt;/p&gt;
            &lt;p&gt;&lt;%= @results %&gt;&lt;/p&gt;
            &lt;p&gt;&lt;%= @results.inspect %&gt;&lt;/p&gt;
            &lt;p&gt;&lt;%= current_user.quiz %&gt;&lt;/p&gt;
               &lt;h4&gt;Quiz Answer&lt;/h4&gt;
               &lt;p&gt;&lt;%= @results.answer1 %&gt;&lt;/p&gt;
               &lt;p&gt;&lt;%= @results.answer2 %&gt;&lt;/p&gt;
               &lt;p&gt;&lt;%= @results.answer3 %&gt;&lt;/p&gt;
               &lt;p&gt;&lt;%= @results.answer4 %&gt;&lt;/p&gt;
               &lt;p&gt;&lt;%= @results.answer5 %&gt;&lt;/p&gt;
               &lt;p&gt;&lt;%= @results.answer6 %&gt;&lt;/p&gt;
               &lt;p&gt;&lt;%= @results.answer7 %&gt;&lt;/p&gt;
               &lt;p&gt;&lt;%= @results.answer8 %&gt;&lt;/p&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
        &lt;footer&gt;
          &lt;p&gt;&lt;a class="btn btn-default" href="showmetheskills.html" role="button"&gt;next&lt;/a&gt;&lt;/p&gt;
        &lt;/footer&gt;
      &lt;/div&gt; &lt;!-- /container --&gt;
  </code></pre>
  
  <p>(I know it's not 'best practise' to have numbered attributes on a Model; ignore that part.)</p>
  
  <p>I get the error:  </p>
  
  <pre><code>undefined method 'answer1' for nil:NilClass
  </code></pre>
  
  <p>Why is <code>@results</code> nil, when I set it IN THE ACTION Rails is asking for?  </p>
  
  <p>The <code>Quiz</code> is created in the <code>QuizzesController</code>:  </p>
  
  <pre><code>def new
      @user = current_user
      @quiz = Quiz.create(user_id: current_user.id)
  end
  </code></pre>
  
  <p>Which triggers <code>quizzes/new.html.erb</code> which renders the quiz partial.  </p>
  
  <p>What's the problem?</p>