Wednesday, August 22, 2007

Ara T. Howard's DRYer Acts As Taggable

On the original blog, Ara introduces it with a question mark, the question being whether or not a replacement for acts_as_taggable is really needed.

I would say it is. First, there's two acts_as_taggables out there - only one is a plugin. Only one's by DHH. However, if you google it a little bit, you'll find that the one by DHH was really only intended as demo code for polymorphic associations. 37 Signals initially used it in Highline and then threw it away because it was too big to be useful. Koz from Rails core has stated in a forum that it shouldn't be used in production code at all - and yet it's the de facto standard for tagging in the Rails community. Maybe due to hero worship, maybe due to tangled lines of communication, but it's out there in production code all over the place, and it shouldn't be.

Anyway, I haven't played with this new, improved alternative yet, but I think it's definitely worth a close look if you need tagging for your Rails app. Check it out here.


  1. The prevalence of acts as taggable even to this day still, is sad and unfortunate proof that alot of modern day programmers, rails programmers especially are just advanced "cargo culter's" smashing together alot of things not knowing how or why they work.

    A better solution is use a polymorphic lib like HMP and then grow out your own suite.

    Polymorphic relations are simple but its the little extras in HMP that make them beautiful.

    Evan Weaver (HMP creator even has a tutorial for making your own tag lib)

    Go here:

  2. Kinda late and likely naive, but had you looked at acts as taggable on steroids? I'm guessing it's similarly condemned as it's an extension of DHH's original.


Note: Only a member of this blog may post a comment.