]> source.dussan.org Git - redmine.git/commitdiff
place the '.' on the previous line of the method call at app/models/attachment.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 17 Dec 2020 13:09:50 +0000 (13:09 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 17 Dec 2020 13:09:50 +0000 (13:09 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20654 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/attachment.rb

index 924bae4f7e3f9deae0a433bbdc46323f3c0c3e7a..3d8d0ee1eaf73e2f12a755ff03200094da3a54db 100644 (file)
@@ -498,12 +498,12 @@ class Attachment < ActiveRecord::Base
   def reuse_existing_file_if_possible
     original_diskfile = nil
     reused = with_lock do
-      if existing = Attachment
-                      .where(digest: self.digest, filesize: self.filesize)
-                      .where('id <> ? and disk_filename <> ?',
-                             self.id, self.disk_filename)
-                      .order(:id)
-                      .last
+      if existing = Attachment.
+                      where(digest: self.digest, filesize: self.filesize).
+                      where('id <> ? and disk_filename <> ?',
+                            self.id, self.disk_filename).
+                      order(:id).
+                      last
         existing.with_lock do
           original_diskfile = self.diskfile
           existing_diskfile = existing.diskfile