Module: ChronoModel::TimeGate
- Extended by:
- ActiveSupport::Concern
- Includes:
- Patches::AsOfTimeHolder
- Defined in:
- lib/chrono_model/time_gate.rb
Overview
Provides the TimeMachine API to non-temporal models that associate temporal ones.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Methods included from Patches::AsOfTimeHolder
Instance Method Details
#as_of(time) ⇒ Object
20 21 22 |
# File 'lib/chrono_model/time_gate.rb', line 20 def as_of(time) self.class.as_of(time).where(id: id).first! end |
#timeline ⇒ Object
24 25 26 |
# File 'lib/chrono_model/time_gate.rb', line 24 def timeline self.class.timeline(self) end |