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}"
|
puts "Identified topic for deletion: Title: #{topic.title} Topic ID: #{topic.id}"
|
||||||
|
|
||||||
# Destroy all posts in the topic
|
# Destroy all posts in the topic
|
||||||
# topic.posts.each do |post|
|
topic.posts.each do |post|
|
||||||
# puts "Deleting post #{post.id} in topic #{topic.id}"
|
puts "Deleting post #{post.id} in topic #{topic.id}"
|
||||||
# post.destroy
|
post.destroy
|
||||||
# end
|
end
|
||||||
#
|
|
||||||
# # Destroy the topic itself
|
# Destroy the topic itself
|
||||||
# topic.destroy
|
topic.destroy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -27,6 +27,18 @@ class GossamerForumsSearch
|
|||||||
puts "Bumped At: #{topic.bumped_at}"
|
puts "Bumped At: #{topic.bumped_at}"
|
||||||
puts "Last Post User ID: #{topic.last_post_user_id}"
|
puts "Last Post User ID: #{topic.last_post_user_id}"
|
||||||
puts "----------------------------------------"
|
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
|
end
|
||||||
|
|
||||||
if matching_topics.empty?
|
if matching_topics.empty?
|
||||||
|
Loading…
Reference in New Issue
Block a user