Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Apr 16, 2021
1 parent d4d91b4 commit ef20ffb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/controllers/concerns/facetable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion app/graphql/types/base_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ef20ffb

Please sign in to comment.