Implement notification for upcoming tasks via a daily fired rake-task.

This commit is contained in:
Benjamin Meichsner 2009-02-10 15:07:47 +01:00
parent 053593f718
commit 67743cd014
7 changed files with 54 additions and 9 deletions

View file

@ -22,6 +22,7 @@ class Task < ActiveRecord::Base
named_scope :non_group, :conditions => { :workgroup_id => nil, :done => false }
named_scope :done, :conditions => {:done => true}, :order => "due_date ASC"
named_scope :upcoming, lambda { |*args| {:conditions => ["done = 0 AND due_date = ?", (args.first || 7.days.from_now)]} }
# form will send user in string. responsibilities will added later
attr_protected :users