Order is already defined on attachments association.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8458 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-01-01 17:35:34 +00:00
parent d84660c823
commit cd256fe89f
1 changed files with 1 additions and 1 deletions

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