2015-09-21 17:59:03 +02:00
|
|
|
class PieceJustificative < ActiveRecord::Base
|
|
|
|
belongs_to :dossier
|
|
|
|
belongs_to :type_de_piece_justificative
|
2016-01-18 16:20:51 +01:00
|
|
|
|
2015-09-21 17:59:03 +02:00
|
|
|
delegate :api_entreprise, :libelle, to: :type_de_piece_justificative
|
2016-01-18 16:20:51 +01:00
|
|
|
|
2015-09-21 17:59:03 +02:00
|
|
|
alias_attribute :type, :type_de_piece_justificative_id
|
2016-01-18 16:20:51 +01:00
|
|
|
|
2015-09-21 17:59:03 +02:00
|
|
|
mount_uploader :content, PieceJustificativeUploader
|
|
|
|
|
|
|
|
def empty?
|
|
|
|
content.blank?
|
|
|
|
end
|
|
|
|
end
|