README.rdoc

Tagtical

This plugin was originally based on acts_as_taggable_on by Michael Bleigh
(mbleigh.com/). That plugin was based on
acts_as_taggable_on_steroids by Jonathan Viney.

While a lot concepts are the same (taggings + tags tables using
polymorphism), this adaption introduces the concept of “relevance” for a
tag and allows for the creation of subclasses on Tag.

For instance, if you want to tag a photo with “Mood Tags”. You would simply
subclass Tag with Tag::Mood and you could add functionality specific to
that model. This involves moving the “context” off of Tagging and moving it
onto Tag as a “type” column. It acts not only as a “context”, but also as a
designator for the STI class. Subsequently, you could also add a
“relevance” for how applicable that mood is.

Tagtical allows for an arbitrary number of Tag subclasses, each of which
can be extended to the needs of the application. Note: Tag subclasses are
required! You cannot do custom “contexts” as you could in
acts_as_taggable_on/

Here are the main differences between tagtical and acts_as_taggable_on:

Add “relevance” to the Tagging class so you can weight the tags to the
object.

Tag cloud calculations

To construct tag clouds, the frequency of each tag needs to be calculated.
Because we specified tagtical on the User class, we can
get a calculation of all the tag counts by using
User.tag_counts_on(:customs). But what if we wanted a tag count
for an single user's posts? To achieve this we call tag_counts on the
association: