Class: ManifestationRelationship

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/manifestation_relationship.rb,
app/models2/manifestation_relationship.rb

Instance Method Summary collapse

Instance Method Details

#check_parentObject



9
10
11
12
13
14
# File 'app/models/manifestation_relationship.rb', line 9

def check_parent
  if parent_id == child_id
    errors.add(:parent)
    errors.add(:child)
  end
end