1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 11:37:14 +00:00

Fix RuboCop offense Style/EmptyLiteral (#39887).

git-svn-id: https://svn.redmine.org/redmine/trunk@23002 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2024-09-01 00:42:33 +00:00
parent 2fe36c4128
commit 987a36281a

View File

@ -641,7 +641,7 @@ class User < Principal
def projects_by_role
return @projects_by_role if @projects_by_role
result = Hash.new([])
result = {}
project_ids_by_role.each do |role, ids|
result[role] = Project.where(:id => ids).to_a
end
@ -674,7 +674,7 @@ class User < Principal
hash[role_id] << project_id
end
result = Hash.new([])
result = {}
if hash.present?
roles = Role.where(:id => hash.keys).to_a
hash.each do |role_id, proj_ids|