acts_as_taggable is dead, long live has_many_polymorphs

Evan Weaver has just posted about how to replace all the different acts_as_taggable implementations with his has_many_polymorphs plugin.

Since the current owners of the acts_as_taggable gem seem to have abandoned it, and DHH’s identically named acts_as_taggable plugin also seems dead, this is probably the best way forward if your writing new code or planning changes to old code in the near future.

I haven’t checked this out yet, but my tag cloud code should be able to work with has_many_polymorphs with little to no modification.

This entry was posted on Sun, 14 Jan 2007 06:12:49 GMT . You can follow any any response to this entry through the Atom feed. You can leave a comment or a trackback from your own site.
Tags


Trackbacks

Use the following link to trackback from your own site:
http://blog.craz8.com/trackbacks?article_id=acts_as_taggable-is-dead-long-live-has_many_polymorphs&day=13&month=01&year=2007

Comments

Leave a response

  1. Dom 9 days later:

    Wow I’d only just got acts_as_taggable working. Looking forward to how you do your tag cloud though.

  2. Vincent 2 months later:

    Hi Tom,

    Could you please re-post your tag cloud code? The link seems broken… Thanks!

  3. tom 2 months later:

    The cloud code is inline with the post, there is no file to download.

  4. Andreas 2 months later:

    Hi Tom,

    I was curious about the tag cloud code.

    Unfortunately, the link to http://blog.craz8.com/articles/2005/10/28/acts_as_taggable-is-a-cool-piece-of-code/ is broken (404 Error).

    Could you please make it available again.

    Thanks,

    Andreas

  5. tom 2 months later:

    That link works for me. Try removing the trailing slash:

    http://blog.craz8.com/articles/2005/10/28/acts_as_taggable-is-a-cool-piece-of-code

    The code looks like this:

    def tag_cloud(tag_cloud, category_list)
      max, min = 0, 0
      tag_cloud.each_value do |count|
        max = count if count > max
        min = count if count < min
      end
    end
    divisor = ((max - min) / category_list.size) + 1
    tag_cloud.each do |tag, count|
      yield tag, category_list[(count - min) / divisor]
    end
  6. darius 2 months later:

    Used your link, without slash. Link is broken for me too.

  7. [...] acts_as_taggable is dead, long live has_many_polymorphs » CRAZ8 Since the current owners of the acts_as_taggable gem seem to have abandoned it, and DHH’s identically named acts_as_taggable plugin also seems dead, this is probably the best way forward if your writing new code or planning changes to old code in the ne (tags: plugin rails) [...]

  8. bitbutter 9 months later:

    The tag cloud link is broken here too (with and without trailing slash).

Leave a comment