From 3fd1ba13f3b92832778eb06d7f792074411b6bf0 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 23 Oct 2015 16:01:31 +0200 Subject: [PATCH] response.body is an Array of Strings. We should get the first element and It should be serialized --- lib/grape_logging/loggers/response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/grape_logging/loggers/response.rb b/lib/grape_logging/loggers/response.rb index c9696fb..27d7413 100644 --- a/lib/grape_logging/loggers/response.rb +++ b/lib/grape_logging/loggers/response.rb @@ -3,7 +3,7 @@ module GrapeLogging class Response < GrapeLogging::Loggers::Base def parameters(request, response) { - response: JSON.parse(response.body) + response: JSON.parse(response.body.first) } end end