title: Ruby on Rails error:AssociationRelation is not an ActiveModel-compatible object. It must implement :to_partial_path
body: <p>I have the following view:</p>
  
  <pre><code># index.html.web
  &lt;h1&gt;Listing answers&lt;/h1&gt;
  
  &lt;%= will_paginate %&gt;
  
    &lt;%= render [@answers]%&gt;
  
  &lt;%= will_paginate %&gt;
  </code></pre>
  
  <p>And the following <code>index</code> action:</p>
  
  <pre class="lang-rb prettyprint-override"><code>def index
    @question = Question.find(params[:question_id])
    @answers = @question.answers.paginate(page: params[:page])
    respond_with(@answers)
  end
  </code></pre>
  
  <p>I'm getting the following errror:</p>
  
  <pre><code>ActiveRecord::AssociationRelation [#&lt;Answer id: 2, content: "b", user_id: nil, question_id: 1, created_at: "2015-04-27 14:59:32", updated_at: "2015-04-27 14:59:32"&gt;, #&lt;Answer id: 3, content: "d", user_id: 1, question_id: 1, created_at: "2015-04-27 15:15:01", updated_at: "2015-04-27 15:15:01"] is not an ActiveModel-compatible object. It must implement :to_partial_path.
  </code></pre>
  
  <p>How can I fix it?</p>