# File lib/polyamorous/activerecord_4.2_ruby_1.9/join_association.rb, line 31 def build_constraint_with_polymorphism( klass, table, key, foreign_table, foreign_key ) if reflection.polymorphic? build_constraint_without_polymorphism( klass, table, key, foreign_table, foreign_key ) .and(foreign_table[reflection.foreign_type].eq(reflection.klass.name)) else build_constraint_without_polymorphism( klass, table, key, foreign_table, foreign_key ) end end