2015-08-13 15:55:19 +02:00
|
|
|
class PieceJointe < ActiveRecord::Base
|
|
|
|
belongs_to :dossier
|
2015-08-17 11:41:57 +02:00
|
|
|
belongs_to :type_piece_jointe
|
2015-08-18 17:00:09 +02:00
|
|
|
delegate :api_entreprise, :libelle, to: :type_piece_jointe
|
2015-08-20 12:20:54 +02:00
|
|
|
alias_attribute :type, :type_piece_jointe_id
|
2015-08-13 15:55:19 +02:00
|
|
|
mount_uploader :content, PieceJointeUploader
|
|
|
|
|
2015-08-17 11:41:57 +02:00
|
|
|
|
2015-08-18 16:51:57 +02:00
|
|
|
def empty?
|
|
|
|
content.blank?
|
2015-08-13 15:55:19 +02:00
|
|
|
end
|
|
|
|
end
|