Class: ActsAsDAG::AbstractLink

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/acts_as_dag/acts_as_dag.rb

Overview

CLASSES (for providing hooks)

Instance Method Summary collapse

Instance Method Details

#not_self_referentialObject



348
349
350
# File 'lib/acts_as_dag/acts_as_dag.rb', line 348

def not_self_referential
  errors.add(:base, "Self referential links #{self.class} cannot be created.") if parent_id && parent_id == child_id
end