I've made some changes to comments so you can now reply to and like them.
You can also now comment on a language or hackroom, which is new and more complicated than it sounds.
Comments have a 'commentable', which is polymorphic and can be anything you like. In this case we add the relation to the language model as
has_many :comments, as: :commentable, polymorphic: true
This tells Rails all comments with this language added as a 'commentable' on a comment (the thing it belongs to), then add it to this languages list of comments.
If you've no idea what I just said, it's because I explained it terribly!
Anyway, likes are similar as they have a 'likeable', which at the moment can only be a comment. But in future you could add post likes as well.
You can see the code for likes here.
Sign in with GitHub to comment