Add reference to user who upload a cerfa or a piece justificative

This commit is contained in:
Xavier J 2016-03-17 17:33:38 +01:00
parent 5ff7bc0075
commit eeaefdcc79
18 changed files with 108 additions and 20 deletions

View file

@ -3,5 +3,5 @@ class CerfaSerializer < ActiveModel::Serializer
attributes :created_at,
:content_url => :url
has_one :user
end

View file

@ -12,5 +12,6 @@ class DossierSerializer < ActiveModel::Serializer
has_many :cerfa
has_many :commentaires
has_many :champs
has_many :pieces_justificatives
has_many :types_de_piece_justificative
end

View file

@ -1,5 +1,7 @@
class PieceJustificativeSerializer < ActiveModel::Serializer
attributes :created_at,
:type_de_piece_justificative_id,
:content_url => :url
has_one :user
end

View file

@ -3,5 +3,4 @@ class TypeDePieceJustificativeSerializer < ActiveModel::Serializer
:libelle,
:description
has_many :pieces_justificatives
end

View file

@ -0,0 +1,3 @@
class UserSerializer < ActiveModel::Serializer
attributes :email
end