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.
This commit is contained in:
Javi Martín
2023-09-04 17:55:23 +02:00
parent 7433c6b91e
commit b23ea25367

View File

@@ -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