polymorphic_type for STI associations

Hi,

Currently polymorphic_type field always use the class name of parent in case of STI.

For example,

I ran into this when I was doing some polymorphic/sti stuff, and it took me a while to find the documentation describing the solution[1]. I'm no expert, so please forgive me, but this wasn't expected the behavior I expected, at least :slight_smile:

So, I'd be curious to hear why things were implemented this way as well.

[1] ActiveRecord::Associations::ClassMethods

Thanks, - Trevor

I think it's so you can join onto the correct table easily and without redundancy, since the child type no longer corresponds to anything in the schema.

Evan