Merge commit '6c3bd944f8890e1a349bd06e9585cb5ec25507e6' into glitch-soc/merge-upstream

This commit is contained in:
Claire committed 2026-02-13 13:03:51 +01:00
commit ddc7df2064
44 files changed
+230 -48

No files matched your search

+1
View File
@@ -26,6 +26,7 @@ class Collection < ApplicationRecord
belongs_to :tag, optional: true
has_many :collection_items, dependent: :delete_all
has_many :collection_reports, dependent: :delete_all
validates :name, presence: true
validates :description, presence: true
+16
View File
@@ -0,0 +1,16 @@
# frozen_string_literal: true
# == Schema Information
#
# Table name: collection_reports
#
# id :bigint(8) not null, primary key
# created_at :datetime not null
# updated_at :datetime not null
# collection_id :bigint(8) not null
# report_id :bigint(8) not null
#
class CollectionReport < ApplicationRecord
belongs_to :collection
belongs_to :report
end
+2
View File
@@ -40,6 +40,8 @@ class Report < ApplicationRecord
belongs_to :assigned_account, optional: true
end
has_many :collection_reports, dependent: :delete_all
has_many :collections, through: :collection_reports
has_many :notes, class_name: 'ReportNote', inverse_of: :report, dependent: :destroy
has_many :notifications, as: :activity, dependent: :destroy