[Nitro] STI relationships

Rob Pitt rob at motionpath.com
Fri Nov 4 08:54:44 EST 2005

I have just noticed if you do not explicitly set the field name in 
has_many relationship STI classes make an incorrect assumption about the 
remote field name.

A fix is to change line 35 of has_many.rb to:

self[:owner_singular_name] = (owner_class.schema_inheritance_child? ? owner_class.schema_inheritance_root_class : owner_class

But this seems like a dirty hack and I wondered if anyone thought there 
was a better way.

More information about the Nitro-general mailing list