Lee Ourand
Joined
410 Experience
4 Lessons Completed
0 Questions Solved
Activity
Hi there Nikodem,
First, a tiny nitpick with your naming—what you're calling ArticlesTag
, I would rename to ArticleTag
. It's just one tag for one article.
Now, to get all the tag names that've been assigned to at least one article, you can do something like:
Tag.joins(:article_tag).distinct.pluck(:name)