From cb14b99f897ead2543dcc9578f1c83b3b98222d4 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Fri, 7 Feb 2014 21:22:20 +0100 Subject: [PATCH] Sort invoices in descending order by number by default --- stoptime.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/stoptime.rb b/stoptime.rb index 278dd3d..56d2381 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -376,6 +376,7 @@ module StopTime::Models has_many :time_entries, :through => :tasks belongs_to :customer belongs_to :company_info + default_scope order('number DESC') # Returns a time and cost summary of the contained tasks (Hash of # Task to Array).