Notes on acts-as-taggable-on

If you're using acts-as-taggable-on, you may have noticed the documentation is a bit… sparse. The following are some of the more helpful resources I've found.

  • The README from Acts as Taggable on Steroids (the inspriation for acts-as-taggable-on)
  • crunchytoast.com has a nice documentation effort

Finally, I ran into errors with trying to build a tag cloud when there were no tags to count. My solution was to embed

    @tags = Post.tag_counts || []

(or similar) into whichever method on the controller was responsible for the page to contain the tag cloud so that the default is an empty list instead of nil.

Back to flipping out...

blog comments powered by Disqus