Fix for polymorphic association field selector not working with AR, which stores and queries the STI base class in polymorphic associations. This commit correctly sets the <polymorphic>_type field to the object's STI base class (not the object's class).