From 4a78b9f97a02b0247de6c2c05e4b0ce06631f7fc Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Fri, 28 Nov 2008 16:52:54 +0100 Subject: [PATCH] fix case where deleting a completed todo which belongs to a recurring todo resulted in multiple todos belonging to the recurring pattern or no todo at all --- app/controllers/todos_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index 15bbcca4..ad3a762a 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -277,11 +277,11 @@ class TodosController < ApplicationController @original_item_due = @todo.due @context_id = @todo.context_id @project_id = @todo.project_id + + @saved = @todo.destroy # check if this todo has a related recurring_todo. If so, create next todo - @new_recurring_todo = check_for_next_todo(@todo) - - @saved = @todo.destroy + @new_recurring_todo = check_for_next_todo(@todo) if @saved respond_to do |format|