Fix rubocop offenses

This commit is contained in:
Sebastian Serth
2023-04-03 15:08:30 +02:00
parent 9b67a6f689
commit b79f0015ad

View File

@ -484,7 +484,7 @@ class ExercisesController < ApplicationController
def collect_set_and_unset_exercise_tags
@tags = policy_scope(Tag)
checked_exercise_tags = @exercise.exercise_tags
checked_tags = checked_exercise_tags.collect(&:tag).to_set
checked_tags = checked_exercise_tags.to_set(&:tag)
unchecked_tags = Tag.all.to_set.subtract checked_tags
@exercise_tags = checked_exercise_tags + unchecked_tags.collect do |tag|
ExerciseTag.new(exercise: @exercise, tag:)