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

@@ -65,14 +65,14 @@ class SpamDetector
# Initialize a spam check for a message.
# @param record [Dmail, ForumPost, Comment] the message to spam check
# @param user_ip [String] the IP address of the user who posted the message
def initialize(record, user_ip: nil)
def initialize(record, user_ip:)
case record
when Dmail
@record = record
@user = record.from
@content = record.body
@comment_type = "message"
@user_ip = user_ip || record.creator_ip_addr.to_s
@user_ip = user_ip
when ForumPost
@record = record
@user = record.creator
@@ -84,7 +84,7 @@ class SpamDetector
@user = record.creator
@content = record.body
@comment_type = "comment"
@user_ip = user_ip || record.creator_ip_addr.to_s
@user_ip = user_ip
else
raise ArgumentError
end