From 9b40ef2a77def478405387ab401cde2c25189cec Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 24 Oct 2018 15:17:41 +0200 Subject: [PATCH] Expose commentaire attachement on api fix #2817 --- app/serializers/commentaire_serializer.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/serializers/commentaire_serializer.rb b/app/serializers/commentaire_serializer.rb index c7366b65b..19360bfdf 100644 --- a/app/serializers/commentaire_serializer.rb +++ b/app/serializers/commentaire_serializer.rb @@ -1,5 +1,10 @@ class CommentaireSerializer < ActiveModel::Serializer attributes :email, :body, - :created_at + :created_at, + :attachment + + def attachment + object.file_url + end end