I use acts-as-taggable-on https://github.com/mbleigh/acts-as-taggable-on for tagging user’s post, I want to find one user’s all post’ all tags and list them, Is there a high performance method ?
I use acts-as-taggable-on https://github.com/mbleigh/acts-as-taggable-on for tagging user’s post, I want to find one user’s
Share
You need to add
acts_as_taggerto the User modelrefer to https://github.com/mbleigh/acts-as-taggable-on#tag-ownership
then you can use the methods provided. If you’re starting from a blank db, this should work but may need to run through some re-assigning loop to have the tagger association work.
Assuming your data is correct, you will then be able to do:
Hope this helps