demarches-normaliennes/app/serializers/commentaire_serializer.rb

11 lines
204 B
Ruby
Raw Normal View History

2016-03-14 10:34:46 +01:00
class CommentaireSerializer < ActiveModel::Serializer
attributes :email,
2017-06-12 13:49:51 +02:00
:body,
:created_at,
2024-02-13 08:10:22 +01:00
:piece_jointe_attachments
def created_at
object.created_at&.in_time_zone('UTC')
end
2017-04-04 15:27:04 +02:00
end