Hi,
I’m looking to add tagging to an application, and I would like to allow
self-referential tags, so that I can tag my tags. With the goal of
generating a flexible tag hierarchy.
After some googling it looks like acts_as_taggable is not the best piece
of code, and I’m hoping to use the has_many_polymorphs plugin from
http://github.com/fauna/has_many_polymorphs/tree/master. After
installing this plugin, and generating a tagging framework using the
builtin
script/generator tagging ModelA ModelB Tag --self-referential
command, I am unable to use the tags, and instead receive the following
error
ActiveRecord::Associations::PolymorphicError: You can’t have a
self-referential polymorphic has_many :through without renaming the
non-polymorphic foreign key in the join model.
Does anyone have an example of self-referential tagging working with
this plugin, or can someone recommend a better way to achieve taggable
tags?
Thanks – Eric