ruby - Rails 4 will_paginate on my comments article show page -


i having hard time reason getting will_paginate gem work rails blog app under comments on articles. have articles paginating fine on index. trying paginate comments on articles show page. not getting errors , links next , previous pages show getting stuck on first page comments when hit next doesn't go next page, if makes since. below articles controller , show view. appreciative. thanks!

    @comments = @article.comments.paginate(:page => params[:page], :per_page => 2)      <%= will_paginate @comments, renderer: bootstrappagination::rails %>  def show @article = article.find(params[:id]) @comments = @article.comments.paginate(:page => params[:page], :per_page => 2)  @tags = tag.all @categories = category.all end  def index @articles = article.paginate(:page => params[:page], :per_page => 5).order("created_at desc") @tags = tag.all @categories = category.all end        <%= will_paginate @comments, renderer: bootstrappagination::rails %>     <%= render @article.comments %> 


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -