has_many :through with self-referencial AND polymorphism

here you have an example


I hope it helps.

Pedro Del gallego wrote:

Thanks Pedro, this is a first step in the right direction.
Now I would like to add support for polymorphism, I mean that the item
related could be of different class (this -> related_to -> book, this ->
related_to -> image, and so on)

It seems that it's not a simple case

Does it changed with Rails 2.0 ?

I tried the solution provided on the hasmanythrough blog but without

Should I go to the has_many_polymorphs plugin ??

I don't like the idea of overusing plugins when I don't know how to
handle a special situation... It's kind of black box in that case