Browse Source

Order is already defined on attachments association.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8458 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/1.4.0
Jean-Philippe Lang 12 years ago
parent
commit
cd256fe89f
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      app/models/document.rb

+ 1
- 1
app/models/document.rb View File

@@ -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

Loading…
Cancel
Save