Skip to main content

Subscribe to GoRails to get access to this episode and all other pro episodes, and new awesome content every month.

Subscribe Now
Only $19/month

Unlimited access. Cancel anytime.

1 Nested Comment Threads in Rails:

Deleting Comments In Nested Threads

Episode 265 · October 2, 2018

Nested comment threads pose a lot of unique challenges. One of these is deleting comments because you can easily lose the child comments or context. We'll take a look at a couple great ways of handling this.

ActiveRecord Views Comments


Transcripts

No transcripts available. Earn a free month

Discussion


Fallback

How about taking an OO approach i.e. changing the type to DeletedComment, e.g. using STI? This eliminates the code smell of conditionals in a partial.


Login or create an account to join the conversation.