]> source.dussan.org Git - redmine.git/commitdiff
Code cleanup.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 28 Oct 2014 18:48:07 +0000 (18:48 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 28 Oct 2014 18:48:07 +0000 (18:48 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13523 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/attachment.rb

index 2af10663e6a36a328fcb2a02132600584a606f13..892d5c3752624cba5766daa9cb18c53b85942142 100644 (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)