summaryrefslogtreecommitdiffstats
path: root/app/models/attachment.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-16 21:18:01 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-16 21:18:01 +0000
commitb455ac2a27aefccdf10c9f3a1727e1edb8b41ae1 (patch)
tree33f65ff98b2a28da04cfef1eb43144e58fe713b8 /app/models/attachment.rb
parent4c090e869ea3248df17264edcc6d9a1e42ffd707 (diff)
downloadredmine-b455ac2a27aefccdf10c9f3a1727e1edb8b41ae1.tar.gz
redmine-b455ac2a27aefccdf10c9f3a1727e1edb8b41ae1.zip
Adds a rake test that removes old unattached uploads (#10253).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8893 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/attachment.rb')
-rw-r--r--app/models/attachment.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index 7fb9ed379..d87a9df4c 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -192,7 +192,7 @@ class Attachment < ActiveRecord::Base
end
def self.prune(age=1.day)
- attachments = Attachment.all(:conditions => ["created_on < ? AND (container_type IS NULL OR container_type = ''", Time.now - age])
+ attachments = Attachment.all(:conditions => ["created_on < ? AND (container_type IS NULL OR container_type = '')", Time.now - age])
attachments.each(&:destroy)
end