demarches-normaliennes/app/serializers/piece_justificative_serializer.rb

12 lines
229 B
Ruby
Raw Normal View History

2016-02-26 12:17:41 +01:00
class PieceJustificativeSerializer < ActiveModel::Serializer
attributes :created_at,
2017-06-12 13:49:51 +02:00
:type_de_piece_justificative_id,
:content_url
2016-02-26 12:17:41 +01:00
has_one :user
def created_at
object.created_at&.in_time_zone('UTC')
end
2017-04-04 15:27:04 +02:00
end