##// END OF EJS Templates
Code cleanup....
Jean-Philippe Lang -
r9534:e4332ba35fea
parent child
Show More
@@ -123,7 +123,7 class Attachment < ActiveRecord::Base
123
123
124 # Deletes the file from the file system if it's not referenced by other attachments
124 # Deletes the file from the file system if it's not referenced by other attachments
125 def delete_from_disk
125 def delete_from_disk
126 if Attachment.first(:conditions => ["disk_filename = ? AND id <> ?", disk_filename, id]).nil?
126 if Attachment.where("disk_filename = ? AND id <> ?", disk_filename, id).empty?
127 delete_from_disk!
127 delete_from_disk!
128 end
128 end
129 end
129 end
General Comments 0
You need to be logged in to leave comments. Login now