Trevor Oke

3737844653

Has_many_polymorphs

I’ve been trying to get some tagging working using Rails, and it’s supposed to be easy using acts_as_taggable. And it would have been. Except that acts_as_taggable has been deprecated. At least there’s a suggestion - has_many_polymorphs.

Unfortunately my install didn’t work properly. I kept getting “is not a taggable model” errors. And that just wouldn’t do.

Solution:

  1. move require ‘tagging_extensions’ to above the initialization block;
  2. add require ‘has_many_polymorphs’ right above that;
  3. restart Mongrel and console;

You should be good to go now.

edit

Of course, it’s right there in the documentation if I had just looked a little harder. Go Team Me!