More goss-cleanup improvements
This commit is contained in:
parent
22175ae2c8
commit
0ad3fad36c
@ -83,13 +83,13 @@ class GossamerForumsCleaner
|
||||
puts "Identified topic for deletion: Title: #{topic.title} Topic ID: #{topic.id}"
|
||||
|
||||
# Destroy all posts in the topic
|
||||
# topic.posts.each do |post|
|
||||
# puts "Deleting post #{post.id} in topic #{topic.id}"
|
||||
# post.destroy
|
||||
# end
|
||||
#
|
||||
# # Destroy the topic itself
|
||||
# topic.destroy
|
||||
topic.posts.each do |post|
|
||||
puts "Deleting post #{post.id} in topic #{topic.id}"
|
||||
post.destroy
|
||||
end
|
||||
|
||||
# Destroy the topic itself
|
||||
topic.destroy
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -27,6 +27,18 @@ class GossamerForumsSearch
|
||||
puts "Bumped At: #{topic.bumped_at}"
|
||||
puts "Last Post User ID: #{topic.last_post_user_id}"
|
||||
puts "----------------------------------------"
|
||||
|
||||
# Fetch and display all posts for the topic
|
||||
topic.posts.each do |post|
|
||||
puts " Post ID: #{post.id}"
|
||||
puts " User ID: #{post.user_id}"
|
||||
puts " Created At: #{post.created_at}"
|
||||
puts " Updated At: #{post.updated_at}"
|
||||
puts " Post Number: #{post.post_number}"
|
||||
puts " Cooked: #{post.cooked.truncate(80)}" # Limit the display of post content to 100 characters
|
||||
puts " Raw: #{post.raw.truncate(80)}" # Limit the display of raw post content to 100 characters
|
||||
puts " ----------------------------------------"
|
||||
end
|
||||
end
|
||||
|
||||
if matching_topics.empty?
|
||||
|
Loading…
Reference in New Issue
Block a user