Files
fizzy/app/models/board/auto_postponing.rb
T
Jorge Manrubia 26df0095bc Rename concern
2025-11-05 14:27:19 +01:00

15 lines
356 B
Ruby

module Board::AutoPostponing
extend ActiveSupport::Concern
included do
before_create :set_default_auto_postpone_period
end
private
DEFAULT_AUTO_POSTPONE_PERIOD = 30.days
def set_default_auto_postpone_period
self.auto_postpone_period ||= DEFAULT_AUTO_POSTPONE_PERIOD unless attribute_present?(:auto_postpone_period)
end
end