Keep all entropy definitions together in the concern
This commit is contained in:
@@ -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) }
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user