lib/active_job/scheduler/schedule.rb
# All events from the mailer DSL.
#
# @private
# @return [Array<ActiveJob::Scheduler::Job>]
All events from the mailer DSL.
All events from the mailer DSL .
def events_from_mailers
        Pathname.glob(Rails.root.join('app', 'mailers', '*.rb')).each do |job|
          require_dependency job.to_s
        end
        ActionMailer::Base
          .descendants
          .select { |mailer| mailer.events.present? }
          .flat_map { |mailer| mailer.events.map { |event| Event.new(event) } }
      end
def events_from_mailers Pathname . glob ( Rails . root . join ( 'app' , 'mailers' , '*.rb' ) ) . each do | job | require_dependency job . to_s end ActionMailer :: Base . descendants . select { | mailer | mailer . events . present? } . flat_map { | mailer | mailer . events . map { | event | Event . new ( event ) } } end
All events from the mailer DSL.
All events from the mailer DSL .
None
Array<ActiveJob::Scheduler::Job>
private
None