Sha256: 6a5d825ccde07fec5d72c4ceb10caa83605d8d2e9cc3e13df8f54a9b2d2bcc71
Contents?: true
Size: 552 Bytes
Versions: 1
Compression:
Stored size: 552 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
temporal_tables-0.6.10 | lib/temporal_tables/join_extensions.rb |