All threads / How do I create a reply comment system?
Ask A Question

Notifications

You’re not receiving notifications from this thread.

How do I create a reply comment system?

Jake Yeaton asked in Rails
I have been trying to get the hang of rails and I understand most of Rails but I'm currently stuck on how I would go about and create a reply commenting system. For example, just like on GoRails. 

Can anyone point me in the correct direction?

I have created a standard comment system which was copied from the GoRails episode. 

Thank you ahead of time.
Hey Jake,

Just to make sure I understand your goals, you want to integrate a Comment + Reply model(s) integration with a Rails app? Are you using AJAX?

I'd be glad to assist, just need a little more info. Can you reference which GoRails episode you're
 talking about?
Yes, i'm trying to integrate just that into my rails app. 

 I'm using AJAX. 

Yeah, this episode: https://gorails.com/episodes/comments-with-polymorphic-associations

Thank you so much Ryan.
My pleasure. 

Have you successfully re-created the Comments/Modules/Models that Chris went over in the video?  Have you successfully integrated AJAX thus far? Once you understand the workflow that was followed you can simply extend it using another instance(s) of poly associations or simple has_many/belong_to associations.

I will update a git repo with an example this weekend if you need something to look through. In the meantime, if you've got a repo feel free to link to it and I will give it a look.

We can get you squared away.

Yes, I have completed all of that and I will give extending it using another instance(s) of poly associations, etc a try! 

I guess that part that I'm having a difficult time understanding how to accomplish is how to create a Reddit style comment system. So for example, if I reply to you then my comments will show in the view under yours and to the right a little bit. Then you respond and it's under my comment and a little more to the right, ect. 

Do you understand how to accomplish this? 

hey chris tried to report the above posts as spam and got This gorails.com page can’t be foundNo web page was found for the web address: https://gorails.com/forum/how-do-i-create-a-reply-comment-system/forum_posts/11741/report

just an fyi

wow, I went crazy reading your post, it's very good and informative. and if you have free time then I invite you to play the game with me.

Very helpful information. I took your advice and everything started to work, I had a similar error

The first step you need to do is set up the post. Source so to access this you just need to go over into your Croco block settings. Or you can go down here to get reviews. And just click on settings.
quordle weaver game

Join the discussion

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

Join 66,029+ 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.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2022 GoRails, LLC. All rights reserved.