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.97k stars 1.19k forks source link

Incorrect tag counts for associations #793

Open andreitr opened 7 years ago

andreitr commented 7 years ago

I am getting incorrect tag counts on associations. Here's the query example: User.last.items.tag_counts_on(:tags)

Here's the result: [<ActsAsTaggableOn::Tag id: 120, name: "exampletag", taggings_count: 77>....]

The returned taggings_count is not limited to user's items... There are total of 77 items tagged with the tag but but the user only has 4.

jprinaldi commented 7 years ago

I stumbled upon this issue as well.

ferrance commented 7 years ago

Same here.

gonzar11 commented 4 years ago

Same here