demarches-normaliennes/app/models/attestation.rb
Pierre de La Morinerie 2892fdbeef models: remove columns that have been deleted from db schema
These columns are gone, so we can't stop ignoring them.
2020-08-12 12:06:58 +02:00

21 lines
451 B
Ruby

# == Schema Information
#
# Table name: attestations
#
# id :integer not null, primary key
# title :string
# created_at :datetime not null
# updated_at :datetime not null
# dossier_id :integer not null
#
class Attestation < ApplicationRecord
belongs_to :dossier
has_one_attached :pdf
def pdf_url
if pdf.attached?
Rails.application.routes.url_helpers.url_for(pdf)
end
end
end