diff options
author | Go MAEDA <maeda@farend.jp> | 2023-01-17 01:38:27 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-01-17 01:38:27 +0000 |
commit | 0b6f4c6811a4a4e823674e3bb8b970ee46a9194b (patch) | |
tree | 341119beb1c247727c68ba9913a7a2bfc3fa3006 /app/models/role.rb | |
parent | 97d07eb28573060085352e0e9046be16e29f5bfd (diff) | |
download | redmine-0b6f4c6811a4a4e823674e3bb8b970ee46a9194b.tar.gz redmine-0b6f4c6811a4a4e823674e3bb8b970ee46a9194b.zip |
Ruby 2.7: Fix RuboCop offense Performance/MapCompact (#38134).
git-svn-id: https://svn.redmine.org/redmine/trunk@22055 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/role.rb')
-rw-r--r-- | app/models/role.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/role.rb b/app/models/role.rb index b73f97d4c..e67f30054 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -122,7 +122,7 @@ class Role < ActiveRecord::Base end def permissions=(perms) - perms = perms.collect {|p| p.to_sym unless p.blank?}.compact.uniq if perms + perms = perms.filter_map {|p| p.to_sym unless p.blank?}.uniq if perms write_attribute(:permissions, perms) end |