Remove `ModerationComment` model, relations and methods

This commit is contained in:
Andreas Nedbal 2022-07-19 00:01:00 +02:00 committed by Karina Kwiatek
parent 5c3d003c2b
commit cbd9106a87
3 changed files with 0 additions and 14 deletions

View File

@ -1,8 +0,0 @@
class ModerationComment < ApplicationRecord
belongs_to :user
belongs_to :report
validates :user_id, presence: true
validates :report_id, presence: true
validates :content, length: { maximum: 160 }
end

View File

@ -1,6 +1,5 @@
class Report < ApplicationRecord
belongs_to :user
has_many :moderation_comments, dependent: :destroy
validates :type, presence: true
validates :target_id, presence: true
validates :user_id, presence: true

View File

@ -35,7 +35,6 @@ class User < ApplicationRecord
has_many :services, dependent: :destroy_async
has_many :notifications, foreign_key: :recipient_id, dependent: :destroy_async
has_many :reports, dependent: :destroy_async
has_many :moderation_comments, dependent: :destroy_async
has_many :lists, dependent: :destroy_async
has_many :list_memberships, class_name: "ListMember", dependent: :destroy_async
has_many :mute_rules, dependent: :destroy_async
@ -154,10 +153,6 @@ class User < ApplicationRecord
existing
end
end
def report_comment(report, content)
ModerationComment.create!(user: self, report: report, content: content)
end
# endregion
def can_export?