mbleigh / acts-as-taggable-on

A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts.
http://mbleigh.lighthouseapp.com/projects/10116-acts-as-taggable-on
MIT License
4.96k stars 1.2k forks source link

Feature Request: Retrieve taggable objects with a given context but no tag_list #995

Open tomekr opened 4 years ago

tomekr commented 4 years ago

At the moment, there doesn't appear to be a way to retrieve a set of records with any tag, given a context. For example, with User having acts_as_taggable_on :skills, I'd like all the user objects that have any kind of skill tag associated with it.

The closest functionality to this is via a hacky method with tagged_with:

# Users with any kind of skill tag
users = User.tagged_with("doesnotexist", on: "skills", exclude: true)