method

build_join_constraint

build_join_constraint(table, foreign_table)
public

No documentation available.

# File activerecord/lib/active_record/reflection.rb, line 177
      def build_join_constraint(table, foreign_table)
        key         = join_keys.key
        foreign_key = join_keys.foreign_key

        constraint = table[key].eq(foreign_table[foreign_key])

        if klass.finder_needs_type_condition?
          table.create_and([constraint, klass.send(:type_condition, table)])
        else
          constraint
        end
      end