acts-as-taggable-on ".tagged_with(:match_all => true)" but finding models with more tags?

16 views Asked by At

I am looking for a acts-as-taggable-on finder that results in selecting all the occurrences that have all the passed tags but allows the occurrences to have more tags.

In the documentation looks like it is either matching exactly all or matching any.

For example:

model_1.tag_list = "tag1, tag2, tag3"
model_2.tag_list = "tag1, tag2"
model_3.tag_list = "tag1, tag3"

Models.tagged_with(["tag1", "tag3"], :match_all_flexible => true) # => [model_1, model_3]
0

There are 0 answers