Not a big fan of the double `#try` here, which leads to a repetition of `association.klass`.
What about something like:

    if association.reflection.polymorphic? && o.changes[association.reflection.foreign_type].any?
      klass = o.changes[association.reflection.foreign_type].first.constantize
    else
      klass = association.klass
    end