2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-06-02 14:30:26 +02:00
|
|
|
class Attestation < ApplicationRecord
|
2020-07-20 16:28:51 +02:00
|
|
|
belongs_to :dossier, optional: false
|
2017-06-02 14:30:26 +02:00
|
|
|
|
2019-08-28 13:11:58 +02:00
|
|
|
has_one_attached :pdf
|
2019-08-27 17:42:52 +02:00
|
|
|
|
2019-07-31 16:09:28 +02:00
|
|
|
def pdf_url
|
2019-08-28 13:11:58 +02:00
|
|
|
if pdf.attached?
|
|
|
|
Rails.application.routes.url_helpers.url_for(pdf)
|
2019-07-31 16:09:28 +02:00
|
|
|
end
|
|
|
|
end
|
2017-06-02 14:30:26 +02:00
|
|
|
end
|