Browse Source

Code cleanup.

git-svn-id: http://svn.redmine.org/redmine/trunk@13523 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/3.0.0
Jean-Philippe Lang 9 years ago
parent
commit
78f65df8f7
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      app/models/attachment.rb

+ 3
- 3
app/models/attachment.rb View File

@@ -255,9 +255,9 @@ class Attachment < ActiveRecord::Base
end

def self.latest_attach(attachments, filename)
attachments.sort_by(&:created_on).reverse.detect {
|att| att.filename.downcase == filename.downcase
}
attachments.sort_by(&:created_on).reverse.detect do |att|
att.filename.downcase == filename.downcase
end
end

def self.prune(age=1.day)

Loading…
Cancel
Save