remove advertisement code

This commit is contained in:
r888888888
2017-02-21 13:33:20 -08:00
parent f4d9f76646
commit 6c9d5e4f9a
24 changed files with 1 additions and 704 deletions

View File

@@ -104,16 +104,7 @@ namespace :images do
upload.generate_resizes(post.file_path)
post.distribute_files
end
desc "Finds advertisement images that don't exist"
task :find_missing_ads => :environment do
Advertisement.where("status = 'active'").each do |ad|
if !File.exists?(ad.image_path)
puts ad.image_path
end
end
end
desc "Generate thumbnail-sized images of posts"
task :generate_preview => :environment do
Post.where("image_width > ?", Danbooru.config.small_image_width).find_each do |post|