Apply automatic rubocop fixes

This commit is contained in:
Sebastian Serth
2021-05-14 10:51:44 +02:00
parent fe4000916c
commit 6cbecb5b39
440 changed files with 2705 additions and 1853 deletions

View File

@ -1,15 +1,17 @@
# frozen_string_literal: true
module ActionCableHelper
def trigger_rfc_action_cable
Thread.new do
# Context: RfC
if submission.study_group_id.present?
ActionCable.server.broadcast(
"la_exercises_#{exercise_id}_channel_study_group_#{submission.study_group_id}",
type: :rfc,
id: id,
html: ApplicationController.render(partial: 'request_for_comments/list_entry',
locals: {request_for_comment: self}))
"la_exercises_#{exercise_id}_channel_study_group_#{submission.study_group_id}",
type: :rfc,
id: id,
html: ApplicationController.render(partial: 'request_for_comments/list_entry',
locals: {request_for_comment: self})
)
end
ensure
ActiveRecord::Base.connection_pool.release_connection
@ -26,9 +28,10 @@ module ActionCableHelper
# Context: Submission
if study_group_id.present?
ActionCable.server.broadcast(
"la_exercises_#{exercise_id}_channel_study_group_#{study_group_id}",
type: :working_times,
working_time_data: exercise.get_working_times_for_study_group(study_group_id, user))
"la_exercises_#{exercise_id}_channel_study_group_#{study_group_id}",
type: :working_times,
working_time_data: exercise.get_working_times_for_study_group(study_group_id, user)
)
end
ensure
ActiveRecord::Base.connection_pool.release_connection