title: nested attribute pagination error (kaminari)
body: <p>I'm pretty sure that this is a simple fix but I'm not seeing it. I have an app where I'd like to show a music_videos comments. Below are my controllers:</p>
  
  <pre><code>def show
    @music_video = MusicVideo.find(params[:id])
    @comment = Comment.new
    @comments = @music_video.comments.page(params[:page]).per(3)
  end
  </code></pre>
  
  <p>The above is my music video controller.</p>
  
  <pre><code>def create
  @music_video = MusicVideo.find(params[:music_video_id])
  @comment = @music_video.comments.build(comment_params)
  
    if @comment.save
      flash[:notice] = "Comment Submitted"
      redirect_to music_video_path(@music_video)
    else
      render 'music_videos/show'
    end
  end
  
  def destroy
    @comment = Comment.find(params[:id])
    @comment.destroy
    redirect_to root_path, notice: "Comment Deleted"
  end
  
  private
  def comment_params
    params.require(:comment).permit(:body)
  end
  </code></pre>
  
  <p>Above is my comments controller</p>
  
  <p>Finally my show page:</p>
  
  <pre><code>&lt;div class="comments_row"&gt;
    &lt;% @music_video.comments.each do |comment| %&gt;
      &lt;% if user_signed_in? &amp;&amp; current_user.admin? %&gt;
       &lt;p class="comment"&gt;&lt;%= comment.body %&gt;&lt;/p&gt;
        &lt;%= link_to 'Delete Comment', music_video_comment_path(@music_video,comment),   
          method: :delete %&gt;
        &lt;% else %&gt;
          &lt;p class="comment"&gt;&lt;%= comment.body %&gt;&lt;/p&gt;
      &lt;% end %&gt;
    &lt;%end%&gt;
  &lt;/div&gt;
  &lt;%= paginate @comments %&gt;
  </code></pre>
  
  <p>I'm pretty sure something is wrong with my controllers, but I'm not sure exactly what it is. @comments is in the correct controller (MusicVideo) within the correct CRUD operation (show). Currently I have six comments in a particular show page and the pagination shows up just fine but the six comments are not paginated. Any thoughts?</p>
  
  <p>EDIT-------------</p>
  
  <p>I figured out one the problem but stumbled on a new one. I figured out that in my controller I am declaring @comments = pagination etc. etc. when in my views there is no @comments to paginate. The problem is now that when I use </p>
  
  <pre><code>&lt;%= paginate @comment %&gt;
  </code></pre>
  
  <p>the code will break.the problem now that I'm having is what variable to paginate. Trying this code will also break</p>
  
  <pre><code>&lt;%= paginate @music_video.comments %&gt; 
  </code></pre>
  
  <p>Any recommendations?</p>