mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-14 03:14:22 +01:00
Merge branch '2.3_branch'
This commit is contained in:
commit
3468d1ec13
3 changed files with 24 additions and 4 deletions
|
|
@ -409,4 +409,16 @@ class Todo < ActiveRecord::Base
|
|||
count
|
||||
end
|
||||
|
||||
def destroy
|
||||
# activate successors if they only depend on this action
|
||||
self.pending_successors.each do |successor|
|
||||
successor.uncompleted_predecessors.delete(self)
|
||||
if successor.uncompleted_predecessors.empty?
|
||||
successor.activate!
|
||||
end
|
||||
end
|
||||
|
||||
super
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue