From 50b09811fc9f9521157f3d9408b4ba2dfbbaffc1 Mon Sep 17 00:00:00 2001 From: Dan Rice Date: Tue, 10 Jun 2014 12:07:30 -0400 Subject: [PATCH] Fix check for whether todo changed containers --- app/helpers/todos_helper.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index bdf7118e..269fca8b 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -508,13 +508,14 @@ module TodosHelper end def todo_moved_out_of_container - return - # moved from one project container to another - (@project_changed && @group_view_by=='project') || - # moved from one context container to another - (@context_changed && @group_view_by=='context') || - # moved from actions-without-project container to another - (@context_changed && @group_view_by=='project' && @todo.project_id.nil?) + # moved from one project container to another + moved_project = @project_changed && @group_view_by=='project' + # moved from one context container to another + moved_context = @context_changed && @group_view_by=='context' + # moved from actions-without-project container to another + moved_without_project = @context_changed && @group_view_by=='project' && @todo.project_id.nil? + + return moved_project || moved_context || moved_without_project end def update_needs_to_hide_container