Manual apply fix from 1.7_branch. Preserve database integrity for recurring todos when deleting project or context. Fixes #880. Fixes #895

This commit is contained in:
Reinier Balt 2010-04-04 18:20:07 +02:00
parent f67dd416d1
commit c3b3e3ea04
4 changed files with 8 additions and 0 deletions

View file

@ -163,6 +163,7 @@ class ProjectsController < ApplicationController
end
def destroy
@project.recurring_todos.each {|rt| rt.remove_from_project!}
@project.destroy
@active_projects_count = current_user.projects.active.count
@hidden_projects_count = current_user.projects.hidden.count