I'm trying to implement something like stackoverflow's tags popover, where you can mouseover any tag and see the number of posts with that tag.
I'm trying to do something like this:
topic = Topic.first
topic.tags.each do |tag|
end
But the count is never populated.
I see, from the way that the tag cloud works in TagsController, that there is a method Tag.counts() that will get me the count but I can't figure out how to get from here to there. What am I missing?
I see also that there is a migration that adds a column taggings_count to the Tag table but that is never updated as far as I can tell.
Can I get some advice?
Thanks in advance,
Kevin