models: set more creator names explicitly.

Set creators explicitly for bans, BURs, comment votes, and posts.
This commit is contained in:
evazion
2020-02-23 02:42:12 -06:00
parent 3a018ee9f7
commit e47d0e0d05
16 changed files with 18 additions and 64 deletions

View File

@@ -10,7 +10,6 @@ class ForumPost < ApplicationRecord
has_one :tag_implication
has_one :bulk_update_request
before_validation :initialize_is_deleted, :on => :create
before_save :update_dtext_links, if: :dtext_links_changed?
before_create :autoreport_spam
after_create :update_topic_updated_at_on_create
@@ -183,10 +182,6 @@ class ForumPost < ApplicationRecord
topic.response_count -= 1
end
def initialize_is_deleted
self.is_deleted = false if is_deleted.nil?
end
def quoted_response
DText.quote(body, creator.name)
end