demarches-normaliennes/app/models/concerns/attachment_titre_identite_watermark_concern.rb
2024-08-22 09:26:48 +02:00

19 lines
438 B
Ruby

# frozen_string_literal: true
# Request a watermark on files attached to a `Champs::TitreIdentiteChamp`.
#
# We're using a class extension here, but we could as well have a periodic
# job that watermarks relevant attachments.
module AttachmentTitreIdentiteWatermarkConcern
extend ActiveSupport::Concern
included do
after_create_commit :watermark_later
end
private
def watermark_later
blob&.watermark_later
end
end