All threads / How do i implement load more comments or reply

Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do i implement load more comments or reply

khemlall mangal asked in Ruby

Chris i followed your series on implementing commenting systeming using polymorphic is true. Now that i got that implemented. i want to know how do i make this work with will paginate for example....

so in my SHOW.html.erb file i render the partial
<%= render partial: "comments/form", locals: {commentable: @campaign}, class:"form-control" %>
<%= render partial: "comments/comments", locals: {commentable: @campaign} %>

                i would like to limit the number of reply returned and allow the user to paginate to the next say 5 comments etc.... how do i do that? can you give a complete example code ..... remember i use your series of polymorphic true series, so build it from that perspective... response as soon as you can will be apprecited
wow no comment or reply .... go much for membership:)
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 39,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.