Skip to content

Commit

Permalink
Fix Ingredient Boolean View
Browse files Browse the repository at this point in the history
In case of a missing translation html_safe would raise an error
on the returned value (a Boolean). So converting it into String
is best option here.
  • Loading branch information
tvdeyen committed Apr 12, 2024
1 parent 3ceaff0 commit 7cc5df6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/alchemy/ingredients/boolean_view.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Alchemy
module Ingredients
class BooleanView < BaseView
def call
Alchemy.t(value, scope: "ingredient_values.boolean").html_safe
Alchemy.t(value.to_s, scope: "ingredient_values.boolean").html_safe
end

def render?
Expand Down

0 comments on commit 7cc5df6

Please sign in to comment.