d41d50d52b
and some other de-tenant changes, including removing the controller tenanting concerns
18 lines
409 B
Ruby
18 lines
409 B
Ruby
module Board::Entropic
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
delegate :auto_postpone_period, to: :entropy
|
|
has_one :entropy, as: :container, dependent: :destroy
|
|
end
|
|
|
|
def entropy
|
|
super || Current.account.entropy
|
|
end
|
|
|
|
def auto_postpone_period=(new_value)
|
|
entropy ||= association(:entropy).reader || self.build_entropy
|
|
entropy.update auto_postpone_period: new_value
|
|
end
|
|
end
|