Pass user services for question generate turbo frame

This commit is contained in:
Karina Kwiatek 2023-01-31 23:10:51 +01:00
parent 7e83c1551c
commit d08198668b
1 changed files with 2 additions and 1 deletions

View File

@ -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