# File lib/polyamorous/activerecord_5.1_ruby_2/join_dependency.rb, line 33 def find_join_association_respecting_polymorphism(reflection, parent, klass) if association = parent.children.find { |j| j.reflection == reflection } unless reflection.polymorphic? association else association if association.base_klass == klass end end end