From ef20ffb79e14e0a8f6092a8e0e666992e2bc05ab Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Fri, 16 Apr 2021 07:22:27 +0200 Subject: [PATCH] fix syntax --- app/controllers/concerns/facetable.rb | 3 ++- app/graphql/types/base_connection.rb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/facetable.rb b/app/controllers/concerns/facetable.rb index 90f57485a..07d5073f4 100644 --- a/app/controllers/concerns/facetable.rb +++ b/app/controllers/concerns/facetable.rb @@ -154,8 +154,9 @@ def facet_by_key(arr) end def facet_by_bool(arr) - id = hsh["key"] == 1 ? "true" : "false" arr.map do |hsh| + id = hsh["key"] == 1 ? "true" : "false" + { "id" => id, "title" => id.capitalize, diff --git a/app/graphql/types/base_connection.rb b/app/graphql/types/base_connection.rb index abf377a20..39c3f3b53 100644 --- a/app/graphql/types/base_connection.rb +++ b/app/graphql/types/base_connection.rb @@ -90,8 +90,9 @@ def facet_by_key(arr) end def facet_by_bool(arr) - id = hsh["key"] == 1 ? "true" : "false" arr.map do |hsh| + id = hsh["key"] == 1 ? "true" : "false" + { "id" => id, "title" => id.capitalize,