Module: Schedulable

Extended by:
ActiveSupport::Concern
Included in:
ApplicationRecord
Defined in:
app/models/concerns/schedulable.rb

Overview

Recurring-schedule support for ActiveRecord models.

Vendored from the schedulable gem — the warmlyyours/schedulable fork
of the long-unmaintained benignware/schedulable (last upstream commit
2016). Heatwave was the de-facto maintainer of that fork, so the code was
pulled in-repo to drop the git: Gemfile dependency. Only the
has_one :schedule association path is kept; the gem's occurrences:
materialization option was never used here.

Mixed into ApplicationRecord, so ClassMethods#acts_as_schedulable is
available to every model. The recurrence engine itself remains the
ice_cube gem — see Schedule.

Defined Under Namespace

Modules: ClassMethods Classes: Config

Constant Summary collapse

SIMPLE_FORM_OPTIONS =

Form-rendering options consumed by ScheduleInput. Previously supplied
by config/initializers/341_schedulable.rb; the values are static, so
they live here as the default.

{
  input_types: { date: :date_picker, time: :time, datetime: :date_picker },
  until: true
}.freeze

Class Method Summary collapse

Class Method Details

.configSchedulable::Config

Returns the form-rendering configuration.

Returns:



31
32
33
# File 'app/models/concerns/schedulable.rb', line 31

def self.config
  @config ||= Config.new(SIMPLE_FORM_OPTIONS)
end