#300: Updated Project and User models to use the new Todo model

This commit is contained in:
Henrik Bohre 2009-05-20 02:06:42 +02:00 committed by Eric Allen
parent e9de70ed95
commit b136816ff1
2 changed files with 9 additions and 0 deletions

View file

@ -20,6 +20,11 @@ class Project < ActiveRecord::Base
:class_name => 'Todo',
:conditions => ["todos.state = ? ", "deferred"],
:order => "show_from"
has_many :pending_todos,
:include => [:context,:tags,:project],
:class_name => 'Todo',
:conditions => ["todos.state = ? ", "pending"],
:order => "show_from"
has_many :notes, :dependent => :delete_all, :order => "created_at DESC"