From 2372c94f5f4fa453a013525f5df8fec61e0d0150 Mon Sep 17 00:00:00 2001 From: Mike Lynch Date: Wed, 11 Oct 2023 01:04:43 +0000 Subject: [PATCH] Update survey index method to only include id, title, timestamp and url --- backend/app/views/surveys/index.json.jbuilder | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/app/views/surveys/index.json.jbuilder b/backend/app/views/surveys/index.json.jbuilder index cdf31851..d7e40fbf 100644 --- a/backend/app/views/surveys/index.json.jbuilder +++ b/backend/app/views/surveys/index.json.jbuilder @@ -1,3 +1,8 @@ # frozen_string_literal: true -json.array! @surveys, partial: 'surveys/survey', as: :survey +json.array! @surveys do |s| + json.id s.id + json.title s.title + json.updated_at s.updated_at + json.url survey_url(s.id, format: :json) +end