Fix backwards logic

All tests passing now. Test::Unit, RSpec, and Selenium all green.
This commit is contained in:
Eric Allen 2009-11-25 16:13:52 -05:00
parent c6249bad0c
commit 868706646b

View file

@ -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'