Add #all_tags_counts method that returns distinct tag names and their usage count

#5 · open · 2 comments

View on GitHub ↗

cblock

This should return an array of arrays of the form: `[ ['tag_name_1',12], ['tag name 2', 1], [...] ]` It should work within scoped queries ``` Ruby Foo.all_tags_counts Foo.where(name: 'test').all_tags_counts Foo.all_colors_counts Foo.where(name: 'test').all_colors_counts ``` ...and mabye there's a better name for this method?

Comments

cblock

...just revised the issue description so that it better conforms to the tag naming convention.

markbates

I'll happily accept a pull request for this.