demarches-normaliennes/app/models/deleted_dossier.rb

8 lines
246 B
Ruby
Raw Normal View History

class DeletedDossier < ApplicationRecord
belongs_to :procedure
def self.create_from_dossier(dossier)
2019-02-18 11:56:09 +01:00
DeletedDossier.create!(dossier_id: dossier.id, procedure: dossier.procedure, state: dossier.state, deleted_at: Time.zone.now)
end
end