mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 17:26:06 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user