瀏覽代碼

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 年之前
父節點
當前提交
cd256fe89f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      app/models/document.rb

+ 1
- 1
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

Loading…
取消
儲存