Sha256: d3713949dfcc62ff85b1a951211cd2604d76d8495429f8235b43e14236b3d676
Contents?: true
Size: 580 Bytes
Versions: 4
Compression:
Stored size: 580 Bytes
Contents
module TemporalTables # This is required for eager_load to work in Rails 5.0.x module JoinDependencyExtensions def build_constraint(klass, table, key, foreign_table, foreign_key) constraint = super if at_value = Thread.current[:at_time] constraint = constraint.and(klass.build_temporal_constraint(at_value)) end constraint end end end case Rails::VERSION::MAJOR when 5 case Rails::VERSION::MINOR when 0, 1 ActiveRecord::Associations::JoinDependency::JoinAssociation.prepend TemporalTables::JoinDependencyExtensions end end
Version data entries
4 entries across 4 versions & 1 rubygems