From b23ea25367c8d262cf8085dab8f6011b7034e9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 4 Sep 2023 17:55:23 +0200 Subject: [PATCH] Apply Performance/CompareWithBlock rule to `sort!` We should have applied this change in commit a78a8d592, since it was added in rubocop-performance 1.18.0, but forgot to do so. --- app/helpers/officing_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/officing_helper.rb b/app/helpers/officing_helper.rb index 8992b75a2..e22e015de 100644 --- a/app/helpers/officing_helper.rb +++ b/app/helpers/officing_helper.rb @@ -4,7 +4,7 @@ module OfficingHelper officer_assignments.each do |oa| options << [oa.booth_assignment.booth.name.to_s, oa.id] end - options.sort! { |x, y| x[0] <=> y[0] } + options.sort_by! { |x| x[0] } options_for_select(options, params[:oa]) end