From d08198668b62319044dad157c379b36cdb9b5f76 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Tue, 31 Jan 2023 23:10:51 +0100 Subject: [PATCH] Pass user services for question generate turbo frame --- app/controllers/inbox_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/inbox_controller.rb b/app/controllers/inbox_controller.rb index ff23f8c6..c38f2c49 100644 --- a/app/controllers/inbox_controller.rb +++ b/app/controllers/inbox_controller.rb @@ -38,10 +38,11 @@ class InboxController < ApplicationController user: current_user) inbox = Inbox.create!(user: current_user, question_id: question.id, new: true) + services = current_user.services respond_to do |format| format.turbo_stream do - render turbo_stream: turbo_stream.prepend("entries", partial: "inbox/entry", locals: { i: inbox }) + render turbo_stream: turbo_stream.prepend("entries", partial: "inbox/entry", locals: { i: inbox, services: }) inbox.update(new: false) end