summaryrefslogtreecommitdiffstats
path: root/lib/redmine
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-07-11 09:35:32 +0000
committerGo MAEDA <maeda@farend.jp>2024-07-11 09:35:32 +0000
commit47d7dd0187c432a2236fec3510dbfbd1aa3efd4a (patch)
tree177be8c7d26cb0ba80bc673226fce215252e9325 /lib/redmine
parent480975a0f5e947f86921b144cb47c970f1e4c4d4 (diff)
downloadredmine-47d7dd0187c432a2236fec3510dbfbd1aa3efd4a.tar.gz
redmine-47d7dd0187c432a2236fec3510dbfbd1aa3efd4a.zip
Fix RuboCop offense Style/CollectionCompact (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@22921 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r--lib/redmine/sudo_mode.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/sudo_mode.rb b/lib/redmine/sudo_mode.rb
index 90a8a2679..dd1876f11 100644
--- a/lib/redmine/sudo_mode.rb
+++ b/lib/redmine/sudo_mode.rb
@@ -47,7 +47,7 @@ module Redmine
#
# taken from https://github.com/brianhempel/hash_to_hidden_fields
def hash_to_hidden_fields(hash)
- cleaned_hash = hash.to_unsafe_h.reject {|k, v| v.nil?}
+ cleaned_hash = hash.to_unsafe_h.compact
pairs = cleaned_hash.to_query.split(Rack::Utils::DEFAULT_SEP)
tags = pairs.map do |pair|
key, value = pair.split('=', 2).map {|str| Rack::Utils.unescape(str)}