markbates / mongoid-tags-arent-hard

A tagging gem for Mongoid 3 that doesn't actually suck.
MIT License
16 stars 12 forks source link

Scope for unique tag list #1

Closed cblock closed 11 years ago

cblock commented 11 years ago

Hi and thanks for this really nice plugin.

Just wondering if there's another scope planned that eases the retrieval of a unique tag list along the lines of the already existing search scopes?

For example

foo1.tags = ["x", "y"]
foo1.name = "baz"
foo2.tags = ["y,z"]
foo2.name = ""

Foo.tags #=> should be ["x","y","z"]
Foo.where(name: "baz").tags #=> should be ["x","y"]
markbates commented 11 years ago

I'm open to a pull request! Shouldn't be that hard to implement.