I am currently migrating an app to Alchemy 7 and since the update, I get a lot of these warnings:
WARNING: The Alchemy::Ingredients::TextView component rendered HTML-unsafe output. The output will be automatically escaped, but you may want to investigate.
I am currently migrating an app to Alchemy 7 and since the update, I get a lot of these warnings:
Turns out, since version 3.9.0, view_component will issue this warning specifically for components that implement
#call
. See https://github.com/ViewComponent/view_component/pull/1950 for all the details.This affects alchemy's ingredient view components, at least
TextView
.This is no big deal, after all the string gets escaped and everything is fine. It is just that the warning (and its frequency) is a bit annoying.
I would have gladly provided a PR, but there is more than one way to fix it, and I am not sure if and how to add tests for this.
Steps to reproduce
Use a
Text
-Ingredient. Watch your test and/or server logs.Expected behavior
No warning should be issued.
Actual behavior
Depending on the usage of
Text
ingredients, a lot of warnings are issued.System configuration