Skip to content

Commit b65e378

Browse files
committed
fix: Mark value as html safe for select and color ingredients
These views are rarely rendered and if the output is HTML safe. Thsi removes a warning from view_component.
1 parent b6a826e commit b65e378

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/components/alchemy/ingredients/color_view.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Alchemy
22
module Ingredients
33
class ColorView < BaseView
44
def call
5-
value
5+
value.html_safe
66
end
77

88
def render?

app/components/alchemy/ingredients/select_view.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module Ingredients
33
class SelectView < BaseView
44
def call
55
if ingredient.multiple? && value.is_a?(Array)
6-
value.to_sentence
6+
value.to_sentence.html_safe
77
else
88
super
99
end

0 commit comments

Comments
 (0)