Sha256: f25ed9d6ab9bd4e2f9a46c1a61430e9b4bf464a2ab03b94d15ad4616873eee95
Contents?: true
Size: 664 Bytes
Versions: 146
Compression:
Stored size: 664 Bytes
Contents
# frozen_string_literal: true # Ensure that the +InboundEmail+ is automatically scheduled for later incineration if the status has been # changed to +processed+. The later incineration will be invoked at the time specified by the # +ActionMailbox.incinerate_after+ time using the +IncinerationJob+. module ActionMailbox::InboundEmail::Incineratable extend ActiveSupport::Concern included do after_update_commit :incinerate_later, if: -> { ActionMailbox.incinerate && status_previously_changed? && processed? } end def incinerate_later ActionMailbox::IncinerationJob.schedule self end def incinerate Incineration.new(self).run end end
Version data entries
146 entries across 141 versions & 11 rubygems