Add collection reach finder (#39346)

This commit is contained in:
David Roetzel authored and GitHub committed 2026-06-09 14:22:21 +00:00
1 parent 4ee893461d
commit 200fda1cdc
19 files changed
+98 -20

No files matched your search

+1
View File
@@ -32,6 +32,7 @@ class Collection < ApplicationRecord
has_many :collection_items, dependent: :delete_all
has_many :accepted_collection_items, -> { accepted }, class_name: 'CollectionItem', inverse_of: :collection # rubocop:disable Rails/HasManyOrHasOneDependent
has_many :collection_reports, dependent: :delete_all
has_many :accounts, -> { merge(CollectionItem.pending_or_accepted) }, through: :collection_items
validates :name, presence: true
validates :name, length: { maximum: 40 }, if: :local?