Class: PersistentAttachment

Inherits:
ApplicationRecord show all
Includes:
SetGuid
Defined in:
app/models/persistent_attachment.rb

Overview

Persistent backing of a Shrine file upload, primarily used by SavedClaim at the moment.

Instance Method Summary collapse

Methods inherited from ApplicationRecord

descendants_using_encryption, lockbox_options, #timestamp_attributes_for_update_in_model, #valid?

Instance Method Details

#stamp_textObject (private)



22
23
24
# File 'app/models/persistent_attachment.rb', line 22

def stamp_text
  I18n.l(saved_claim.created_at, format: :pdf_stamp)
end

#to_pdfObject



16
17
18
# File 'app/models/persistent_attachment.rb', line 16

def to_pdf
  Common::ConvertToPdf.new(file).run
end