Module: Cti::ActiveRecord::ActsAsPredecessor::InstanceMethods

Defined in:
lib/cti/active_record/acts_as_predecessor.rb

Instance Method Summary collapse

Instance Method Details

#heritageObject



32
33
34
# File 'lib/cti/active_record/acts_as_predecessor.rb', line 32

def heritage
  self
end

#lineageObject



36
37
38
# File 'lib/cti/active_record/acts_as_predecessor.rb', line 36

def lineage
  heir
end

#touch_heirObject



40
41
42
43
44
# File 'lib/cti/active_record/acts_as_predecessor.rb', line 40

def touch_heir
  if self.changed?
    heir.try(:touch)
  end
end