mirror of
https://github.com/redmine/redmine.git
synced 2026-03-03 19:11:28 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user