models: stop saving IP addresses in version tables.

Mark various `creator_ip_addr` and `updater_ip_addr` columns as ignored
and stop updating them in preparation for dropping them.
This commit is contained in:
evazion
2022-09-18 03:02:30 -05:00
parent 44d4452068
commit d4da8499ce
28 changed files with 60 additions and 50 deletions

View File

@@ -2,6 +2,7 @@
class ForumPost < ApplicationRecord
attr_readonly :topic_id
attr_accessor :creator_ip_addr
belongs_to :creator, class_name: "User"
belongs_to_updater
@@ -97,7 +98,7 @@ class ForumPost < ApplicationRecord
end
def autoreport_spam
if SpamDetector.new(self, user_ip: CurrentUser.ip_addr).spam?
if SpamDetector.new(self, user_ip: creator_ip_addr).spam?
moderation_reports << ModerationReport.new(creator: User.system, reason: "Spam.")
end
end