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"], }