From 62d183ddf4acdc091b09731043dff22ada4ea0f1 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 4 Jan 2021 20:28:21 -0600 Subject: [PATCH] Add fix script to regenerate old posts with transparent backgrounds. Fixes #1862. Very old posts with transparent backgrounds used black instead of white backgrounds in thumbnails. This was changed in #603 (see also #1239), but the thumbnails were never regenerated. --- script/fixes/068_regenerate_transparent_backgrounds.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 script/fixes/068_regenerate_transparent_backgrounds.rb diff --git a/script/fixes/068_regenerate_transparent_backgrounds.rb b/script/fixes/068_regenerate_transparent_backgrounds.rb new file mode 100755 index 000000000..e7792259f --- /dev/null +++ b/script/fixes/068_regenerate_transparent_backgrounds.rb @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby + +require_relative "../../config/environment" + +Post.system_tag_match("transparent_background id:<=1361925").find_each do |post| + post.regenerate_later!("resizes", User.system) +end