This project is archived and is in readonly mode.
Problem combining single table inheritance and a has_many relation
-
Stefan Kroes
Page.find(:all)should be
Content.find(:all)Apologies.
-
Stephen Celis
I don't think this is a bug.
To use the assignment method, you need to explicitly call "self":
self.inheritance_column = 'inheritance_type'Or, use this friendly method:
set_inheritance_column = 'inheritance_type'Of course, once the inheritance_column is set, your has_many is going to break: I'm pretty sure it's only going to pick up objects with the class name "Content" (not "Section"), because the relationship isn't really polymorphic.
-
Stephen Celis
Oops, that second one isn't assignment:
set_inheritance_column 'inheritance_type' -
josh
- State changed from new to invalid