mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-09 09:04:21 +01:00
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:
parent
f67dd416d1
commit
c3b3e3ea04
4 changed files with 8 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
class Context < ActiveRecord::Base
|
||||
|
||||
has_many :todos, :dependent => :delete_all, :include => :project, :order => "todos.completed_at DESC"
|
||||
has_many :recurring_todos, :dependent => :delete_all
|
||||
belongs_to :user
|
||||
|
||||
named_scope :active, :conditions => { :hide => false }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue