Remove `ModerationComment` model, relations and methods
This commit is contained in:
parent
5c3d003c2b
commit
cbd9106a87
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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?
|
||||
|
|
Loading…
Reference in New Issue