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,