From 08945a0126af0522a7d478c63cfff30b7e77b132 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sat, 14 Oct 2023 20:45:17 +0000 Subject: [PATCH 1/2] Update rubocop-performance to version 1.19.1 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ec2e601..3571d2c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -327,7 +327,7 @@ GEM rubocop (~> 1.33) rubocop-graphql (1.3.0) rubocop (>= 0.87, < 2) - rubocop-performance (1.18.0) + rubocop-performance (1.19.1) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) rubocop-rails (2.20.2) From ecaec0ed7b1f7be4bedc069770f807cca8e04d59 Mon Sep 17 00:00:00 2001 From: Thomas Schmidt Date: Sun, 15 Oct 2023 13:26:55 +0200 Subject: [PATCH 2/2] fix new rule --- app/controllers/api/users_controller.rb | 2 +- app/graphql/mutations/update_user.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/users_controller.rb b/app/controllers/api/users_controller.rb index 59b8ee0..7622a59 100644 --- a/app/controllers/api/users_controller.rb +++ b/app/controllers/api/users_controller.rb @@ -61,6 +61,6 @@ def user_params end def tags_params - params['tags'].to_s.split(',').map(&:strip).map(&:downcase).compact_blank + params['tags'].to_s.split(',').map { |t| t.strip.downcase }.compact_blank end end diff --git a/app/graphql/mutations/update_user.rb b/app/graphql/mutations/update_user.rb index 091d33e..ad233f8 100644 --- a/app/graphql/mutations/update_user.rb +++ b/app/graphql/mutations/update_user.rb @@ -45,7 +45,7 @@ def mass_assign_attributes(attributes) end def tags_attributes(attributes) - attributes[:tags].to_s.split(',').map(&:strip).map(&:downcase).compact_blank + attributes[:tags].to_s.split(',').map { |t| t.strip.downcase }.compact_blank end def user(ident)