Skip to content

Commit 1de5bfd

Browse files
committed
Remove output from extension json
- This removes the plan id from the questions and answers json
1 parent 865d5de commit 1de5bfd

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

app/views/api/v2/plans/_show.json.jbuilder

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,13 @@ unless @minimal
7171

7272
if @question_and_answer
7373
json.questions_and_answers do
74-
outputs.each do |output|
75-
q_and_a = presenter.send(:fetch_all_q_and_a)
76-
next if q_and_a.blank?
77-
78-
json.set! output.id.to_s do
79-
json.array! q_and_a do |item|
80-
json.title item[:title]
81-
json.question item[:question]
82-
json.answer item[:answer]
83-
end
84-
end
74+
q_and_a = presenter.send(:fetch_all_q_and_a)
75+
next if q_and_a.blank?
76+
77+
json.array! q_and_a do |item|
78+
json.title item[:title]
79+
json.question item[:question]
80+
json.answer item[:answer]
8581
end
8682
end
8783
end

0 commit comments

Comments
 (0)