Merge pull request #1031 from Retrospring/fix/pass-services-to-question-generate-frame

Pass user services for question generate turbo frame
This commit is contained in:
Karina Kwiatek 2023-01-31 23:12:09 +01:00 committed by GitHub
commit 257c60af38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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