Skip to content

Commit

Permalink
Merge pull request #2367 from tvdeyen/fix-boolean-preview-text
Browse files Browse the repository at this point in the history
Fix ingredient boolean preview text
  • Loading branch information
tvdeyen authored Sep 4, 2022
2 parents feb5e6f + 0b13c17 commit 32e32b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/alchemy/ingredients/boolean.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ def value
# Used by the Element#preview_text method.
#
def preview_text(_max_length = nil)
Alchemy.t(value, scope: "ingredient_values.boolean")
return if value.nil?

Alchemy.t(value.to_s, scope: "ingredient_values.boolean")
end
end
end
Expand Down

0 comments on commit 32e32b4

Please sign in to comment.