Files
fizzy/app/models/collection/entropic.rb
T
2025-11-02 13:11:41 +01:00

17 lines
348 B
Ruby

module Collection::Entropic
extend ActiveSupport::Concern
included do
delegate :auto_postpone_period, to: :entropy
end
def entropy
super || Entropy.default
end
def auto_postpone_period=(new_value)
entropy ||= association(:entropy).reader || self.build_entropy
entropy.update auto_postpone_period: new_value
end
end