Added pagination to task archiv.

This commit is contained in:
Benjamin Meichsner 2009-03-23 11:23:41 +01:00
parent f018db5b15
commit 759217763e
3 changed files with 4 additions and 2 deletions

View file

@ -21,7 +21,7 @@ class Task < ActiveRecord::Base
belongs_to :workgroup
named_scope :non_group, :conditions => { :workgroup_id => nil, :done => false }
named_scope :done, :conditions => {:done => true}, :order => "due_date ASC"
named_scope :done, :conditions => {:done => true}, :order => "due_date DESC"
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