I googled my question but it seems like I don’t know what’s it called that I’m looking for.
What I basically want is a selection of a current_user’s or other user’s comments. They should be displayed below an article as a possible feature, but what’s important is that only the user’s comments, which belong to the current article shall be displayed. Right now, when I call current_user.comments, all the user’s comments are shown, but I only want those where the comment’s article_id matches the current article.
How are these things done in Rails?
Any help is appreciated!
I googled my question but it seems like I don’t know what’s it called
Share
1 Answer