Fix RuboCop offense Style/HashEachMethods (#39887).

git-svn-id: https://svn.redmine.org/redmine/trunk@22532 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2023-12-20 08:13:48 +00:00
parent d9ef2d191c
commit c8640d7ffc
13 changed files with 19 additions and 29 deletions

View File

@@ -153,10 +153,6 @@ class GroupsController < ApplicationController
end
def user_count_by_group_id
h = User.joins(:groups).group('group_id').count
h.keys.each do |key|
h[key.to_i] = h.delete(key)
end
h
User.joins(:groups).group(:group_id).count.transform_keys(&:to_i)
end
end