Module: ChronoModel::TimeGate
- Extended by:
- ActiveSupport::Concern
- 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
Instance Method Details
#as_of(time) ⇒ Object
27 28 29 |
# File 'lib/chrono_model/time_gate.rb', line 27 def as_of(time) self.class.as_of(time).where(:id => self.id).first! end |
#timeline ⇒ Object
31 32 33 |
# File 'lib/chrono_model/time_gate.rb', line 31 def timeline self.class.timeline(self) end |