0

Sorry for such a long topic, that what I can only express with these words.

For example: @article=Article.new

and users could tag @article differently, with their own tag( like good)

Then, how can I show the good tag how many times being taged to the @article?

After searching around, I just find solutions to count the overall times a tag being tagged( In this case, how many times the 'good' being used on Article.all), like :Acts-as-taggable-on find all tags by context. Just like what we have in stackoverflow's tag feature

Community
  • 1
  • 1
ZK Zhao
  • 19,885
  • 47
  • 132
  • 206

1 Answers1

0

Use Article.tagged_with('good').count

jvnill
  • 29,479
  • 4
  • 83
  • 86