Fix Rubocop offenses

This commit is contained in:
Sebastian Serth
2023-09-11 14:10:16 +02:00
parent a542985edd
commit c29256aa81
23 changed files with 27 additions and 27 deletions

View File

@ -150,7 +150,7 @@ class InternalUsersController < ApplicationController
@user ||= InternalUser.new # Only needed for the `create` action
checked_study_group_memberships = @user.study_group_memberships
checked_study_groups = checked_study_group_memberships.collect(&:study_group).sort.to_set
unchecked_study_groups = StudyGroup.all.order(name: :asc).to_set.subtract checked_study_groups
unchecked_study_groups = StudyGroup.order(name: :asc).to_set.subtract checked_study_groups
@study_group_memberships = checked_study_group_memberships + unchecked_study_groups.collect do |study_group|
StudyGroupMembership.new(user: @user, study_group:)
end