From 93b5208589a6e186d160edefd586b1da435f3826 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Thu, 15 Apr 2021 21:34:34 +0200 Subject: [PATCH] fix linting --- app/controllers/concerns/facetable.rb | 3 +-- app/graphql/types/base_connection.rb | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/concerns/facetable.rb b/app/controllers/concerns/facetable.rb index 7f38cfd07..3d7dad315 100644 --- a/app/controllers/concerns/facetable.rb +++ b/app/controllers/concerns/facetable.rb @@ -155,10 +155,9 @@ def facet_by_key(arr) def facet_by_bool(arr) values = { 0 => "no", 1 => "yes" } - arr.map do |hsh| { - "id" => hsh["key"] , + "id" => hsh["key"], "title" => values[hsh["key"]], "count" => hsh["doc_count"], } diff --git a/app/graphql/types/base_connection.rb b/app/graphql/types/base_connection.rb index 1f5f6926d..79e191231 100644 --- a/app/graphql/types/base_connection.rb +++ b/app/graphql/types/base_connection.rb @@ -91,10 +91,9 @@ def facet_by_key(arr) def facet_by_bool(arr) values = { 0 => "no", 1 => "yes" } - arr.map do |hsh| { - "id" => hsh["key"] , + "id" => hsh["key"], "title" => values[hsh["key"]], "count" => hsh["doc_count"], }