v0.1 - Added new script for encoding correction

This commit is contained in:
David Sainty 2024-09-09 16:14:48 +10:00
parent 4f6d4ef5e7
commit 6b4495943a

View File

@ -64,12 +64,12 @@ class GossamerForumsCorrectEncoding < ImportScripts::Base
puts "+++++++ fixed_content:\n#{fixed_content}" puts "+++++++ fixed_content:\n#{fixed_content}"
puts "---------------------------------------------------------------------------------------------" puts "---------------------------------------------------------------------------------------------"
# post.update(raw: fixed_content) # post.update(raw: fixed_content)
post.raw = fixed_content # post.raw = fixed_content
if post.save # if post.save
puts "Post ##{post.id} updated successfully." # puts "Post ##{post.id} updated successfully."
else # else
puts "Failed to update Post ##{post.id}: #{post.errors.full_messages.join(', ')}" # puts "Failed to update Post ##{post.id}: #{post.errors.full_messages.join(', ')}"
end # end
end end
end end