nsfw tags filtered (for now), fix to tag cleanup

This commit is contained in:
Kyle Drake 2014-10-13 18:24:14 -07:00
parent 56f2f5bfb4
commit 26c27cef49
3 changed files with 10 additions and 7 deletions

View file

@ -140,11 +140,11 @@ task :cleantags => [:environment] do
Tag.all.each do |tag|
if tag.name.length > Tag::NAME_LENGTH_MAX
tag.sites.each { |site| tag.remove_site site }
tag.sites.each { |site| site.remove_tag tag }
tag.delete
else
tag.update name: tag.name.downcase.strip
end
tag.update name: tag.name.downcase.strip
end
Tag.all.each do |tag|
@ -161,9 +161,11 @@ task :cleantags => [:environment] do
matching_tag.delete
end
end
Tag.where(name: 'porn').first.update is_nsfw: true
end
require 'thread/pool'
require 'thread/pool'
desc 'update screenshots'
task :update_screenshots => [:environment] do