What do you think about:

```ruby
        association = o.association(name)
        reflection = association.reflection
        if reflection.polymorphic? && o.changes.has_key?(reflection.foreign_type)
          klass = o.public_send("#{reflection.foreign_type}_was").constantize
        else
          klass = association.klass
        end
```