You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When rendering a ViewComponent via the with_content method a Dynamic Render Path warning will be raised. However, using the block version, the warning is not raised. Example using the basic implementation for a view component:
<!-- Noerrorraised -->
<%= renderExampleComponent.new(title: "my title")%><!-- Error raised -->
<%= renderExampleComponent.new(title: "my title").with_content("string") %>
<!-- Noerrorraised -->
<%= renderExampleComponent.new(title: "my title")do%> string<% end %>
<!-- Noerrorraised -->
<%= renderExampleComponent.new(title: "my title")do%> <%= "string" %>
<% end %>
My debugging has lead me to the renderable? method, and it appears like it's missing logic to detect the with_content usage of this pattern.
The text was updated successfully, but these errors were encountered:
Background
Brakeman version: 5.4.1
Rails version: 6.1.7.6
Ruby version: 2.7.7p221
Link to Rails application code: N/A
Issue
When rendering a
ViewComponent
via thewith_content
method a Dynamic Render Path warning will be raised. However, using the block version, the warning is not raised. Example using the basic implementation for a view component:My debugging has lead me to the
renderable?
method, and it appears like it's missing logic to detect thewith_content
usage of this pattern.The text was updated successfully, but these errors were encountered: