Find related keywords on multiple taggable types #146

Closed
benoror opened this Issue Apr 26, 2011 · 1 comment

Projects

None yet

1 participant

@benoror
benoror commented Apr 26, 2011

I would like to have the ability to find related items between diferent models:

@article.find_related_keywords <-- Would return an array of Article's with related keywords of the original @article
@article.find_related_keywords(:on => :books) <-- Would return an array of Book's with related keywords of the original @article

More info: http://stackoverflow.com/questions/5571342/rails-acts-as-taggable-on-find-related-keywords-on-multiple-taggable-types

@benoror
benoror commented Apr 26, 2011

I feel stupid, the obvious solution is:

Book.tagged_with(@article.category_list, :any => true)

@benoror benoror closed this Apr 26, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment