mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-21 22:54:09 +01:00
Ticket #300: Correctly activates/blocks dependent todos from mobile view also.
Conflicts: app/views/todos/toggle_check.js.rjs
This commit is contained in:
parent
c5df6b66b1
commit
cb76ecd866
2 changed files with 20 additions and 16 deletions
|
|
@ -233,6 +233,16 @@ class Todo < ActiveRecord::Base
|
|||
@predecessor_array << t.description
|
||||
end
|
||||
|
||||
# Return todos that should be activated if the current todo is completed
|
||||
def pending_to_activate
|
||||
return successors.find_all {|t| t.uncompleted_predecessors.empty?}
|
||||
end
|
||||
|
||||
# Return todos that should be blocked if the current todo is undone
|
||||
def active_to_block
|
||||
return successors.find_all {|t| t.active?}
|
||||
end
|
||||
|
||||
# Rich Todo API
|
||||
|
||||
def self.from_rich_message(user, default_context_id, description, notes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue