mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 08:18:50 +01:00
preserve database integrity for recurring todos when deleting project or context. Fixes #880. Fixes #895
This commit is contained in:
parent
f1a3ec2d7d
commit
3cc3253ce3
4 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue