mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-03 07:48:50 +01:00
Fix backwards logic
All tests passing now. Test::Unit, RSpec, and Selenium all green.
This commit is contained in:
parent
c6249bad0c
commit
868706646b
1 changed files with 2 additions and 2 deletions
|
|
@ -182,9 +182,9 @@ class Todo < ActiveRecord::Base
|
|||
def update_state_from_project
|
||||
if state == 'project_hidden' and !project.hidden?
|
||||
if self.uncompleted_predecessors.empty?
|
||||
self.state = 'pending'
|
||||
else
|
||||
self.state = 'active'
|
||||
else
|
||||
self.state = 'pending'
|
||||
end
|
||||
elsif state == 'active' and project.hidden?
|
||||
self.state = 'project_hidden'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue