Sha256: a354be84b7a035badea4f059dc93ff54fe238f2e7b6e3feafd545e1094fa8c93
Contents?: true
Size: 683 Bytes
Versions: 17
Compression:
Stored size: 683 Bytes
Contents
module ActiveRecord module Associations class JoinDependency class JoinAssociation silence_warnings do def build_constraint(klass, table, key, foreign_table, foreign_key) # CPK # constraint = table[key].eq(foreign_table[foreign_key]) constraint = cpk_join_predicate(table, key, foreign_table, foreign_key) if klass.finder_needs_type_condition? constraint = table.create_and([ constraint, klass.send(:type_condition, table) ]) end constraint end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems