demarches/app/models/letter.rb
2024-09-01 16:55:38 +02:00

12 lines
208 B
Ruby

class Letter < ApplicationRecord
has_one_attached :pdf
has_many :signatories
def create!(name, document)
super
end
def current_signatories
self.signatories.where.not(signed_at: nil).count
end
end