Class: Dependency
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Dependency
- Defined in:
- app/models/dependency.rb
Instance Method Summary collapse
Instance Method Details
#check_circular_dependencies ⇒ Object
8 9 10 11 12 |
# File 'app/models/dependency.rb', line 8 def check_circular_dependencies unless predecessor.nil? || successor.nil? errors.add("Depends on:", "Adding '#{successor.specification}' would create a circular dependency") if successor.is_successor?(predecessor) end end |