From 63372cdeacd9c33559b01538f84046584cd30fc1 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Mon, 8 May 2023 21:45:31 +0200 Subject: [PATCH] Pass subscribed answer IDs on answer create --- app/controllers/ajax/answer_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/ajax/answer_controller.rb b/app/controllers/ajax/answer_controller.rb index e038ae69..0c401638 100644 --- a/app/controllers/ajax/answer_controller.rb +++ b/app/controllers/ajax/answer_controller.rb @@ -48,7 +48,7 @@ class Ajax::AnswerController < AjaxController # this assign is needed because shared/_answerbox relies on it, I think @question = 1 - @response[:render] = render_to_string(partial: "answerbox", locals: { a: answer, show_question: false }) + @response[:render] = render_to_string(partial: "answerbox", locals: { a: answer, show_question: false, subscribed_answer_ids: [answer.id] }) end def destroy