summaryrefslogtreecommitdiffstats
path: root/app/models/document.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/document.rb')
-rw-r--r--app/models/document.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/document.rb b/app/models/document.rb
index 208b10876..0917f8449 100644
--- a/app/models/document.rb
+++ b/app/models/document.rb
@@ -45,7 +45,7 @@ class Document < ActiveRecord::Base
def updated_on
unless @updated_on
- a = attachments.find(:first, :order => 'created_on DESC')
+ a = attachments.last
@updated_on = (a && a.created_on) || created_on
end
@updated_on