I’m creating a “Related content” area on a website and using the acts-as-taggable-on gem to do this. Then in an article, it pulls in related content by keywords matches. The following code works well with find_related_keywords (NOTE: Putting all the logic in the View to simplify and make this work for now, will refactor appropriately later)
<% for related in @article.find_related_keywords.limit(5) %>
# Markup for related item in here
<% end %>
However, this only returns related content in the same model type, in this case, Article. I also have other models/tables like Reviews, Interviews, etc that also have a :keywords taggable field defined and would like those included in the find_related_keywords results. Is there a way to do this?
Have you tried: