demarches-normaliennes/app/models/attestation.rb
2023-08-02 11:43:23 +02:00

11 lines
212 B
Ruby

class Attestation < ApplicationRecord
belongs_to :dossier, optional: false
has_one_attached :pdf
def pdf_url
if pdf.attached?
Rails.application.routes.url_helpers.url_for(pdf)
end
end
end