Keep all entropy definitions together in the concern

This commit is contained in:
David Heinemeier Hansson
2025-11-02 13:17:55 +01:00
parent b3474ec97d
commit fb395c8b07
2 changed files with 1 additions and 1 deletions
-1
View File
@@ -8,7 +8,6 @@ class Collection < ApplicationRecord
has_many :tags, -> { distinct }, through: :cards
has_many :events
has_many :webhooks, dependent: :destroy
has_one :entropy, as: :container, dependent: :destroy
scope :alphabetically, -> { order("lower(name)") }
scope :ordered_by_recently_accessed, -> { merge(Access.ordered_by_recently_accessed) }
+1
View File
@@ -3,6 +3,7 @@ module Collection::Entropic
included do
delegate :auto_postpone_period, to: :entropy
has_one :entropy, as: :container, dependent: :destroy
end
def entropy