Module: Historical::ActiveRecord::Extensions::InstanceMethods
- Defined in:
- lib/historical/active_record.rb
Instance Method Summary collapse
-
#history ⇒ ModelHistory
The history of this model.
-
#invalidate_history! ⇒ Object
Invalidates the history of that model.
-
#version ⇒ Integer
The version number of this model.
Instance Method Details
#history ⇒ ModelHistory
Returns The history of this model.
48 49 50 |
# File 'lib/historical/active_record.rb', line 48 def history @history ||= Historical::ModelHistory.new(self) end |
#invalidate_history! ⇒ Object
Invalidates the history of that model
59 60 61 |
# File 'lib/historical/active_record.rb', line 59 def invalidate_history! @history = nil end |
#version ⇒ Integer
Returns The version number of this model.
53 54 55 |
# File 'lib/historical/active_record.rb', line 53 def version historical_version || history.own_version.version_index end |