diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-25 20:54:11 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-25 20:54:11 +0000 |
commit | e4332ba35fea68b81be2957af2464cab4f54b9fd (patch) | |
tree | 54c05b3d0024634cd8b60680ae22595e5ae64bc7 | |
parent | d664fdcde9437007c291f7e1ad18257da20d57df (diff) | |
download | redmine-e4332ba35fea68b81be2957af2464cab4f54b9fd.tar.gz redmine-e4332ba35fea68b81be2957af2464cab4f54b9fd.zip |
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9717 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/models/attachment.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 8daa4cf0b..b61db87e5 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -123,7 +123,7 @@ class Attachment < ActiveRecord::Base # Deletes the file from the file system if it's not referenced by other attachments def delete_from_disk - if Attachment.first(:conditions => ["disk_filename = ? AND id <> ?", disk_filename, id]).nil? + if Attachment.where("disk_filename = ? AND id <> ?", disk_filename, id).empty? delete_from_disk! end end |