Class: ChronoModel::Patches::AsOfTimeRelation

Inherits:
ActiveRecord::Relation
  • Object
show all
Defined in:
lib/chrono_model/patches/as_of_time_relation.rb

Overview

This class is a dummy relation whose scope is only to pass around the as_of_time parameters across ActiveRecord call chains.

With AR 5.2 a simple relation can be used, as the only required argument is the model. 5.0 and 5.1 require more arguments, that are passed here.

Instance Method Summary collapse

Constructor Details

#initialize(klass, table: klass.arel_table, predicate_builder: klass.predicate_builder, values: {}) ⇒ AsOfTimeRelation

Returns a new instance of AsOfTimeRelation.



12
13
14
# File 'lib/chrono_model/patches/as_of_time_relation.rb', line 12

def initialize(klass, table: klass.arel_table, predicate_builder: klass.predicate_builder, values: {})
  super(klass, table, predicate_builder, values)
end