Track dossier demander un avis
This commit is contained in:
parent
9c472e6524
commit
b8bf662c6d
4 changed files with 30 additions and 0 deletions
19
app/serializers/avis_serializer.rb
Normal file
19
app/serializers/avis_serializer.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
class AvisSerializer < ActiveModel::Serializer
|
||||
attributes :email,
|
||||
:answer,
|
||||
:introduction,
|
||||
:created_at,
|
||||
:answered_at
|
||||
|
||||
def email
|
||||
object.email_to_display
|
||||
end
|
||||
|
||||
def created_at
|
||||
object.created_at&.in_time_zone('UTC')
|
||||
end
|
||||
|
||||
def answered_at
|
||||
object.updated_at&.in_time_zone('UTC')
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue