File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ module RenderLiteralHelpers
28
28
(send nil? {:render :render_to_string} (send _ :new ...) ...)
29
29
PATTERN
30
30
31
+ def_node_matcher :render_view_component_instance_with_content? , <<-PATTERN
32
+ (send nil? {:render :render_to_string} (send (send _ :new ...) `:with_content ...))
33
+ PATTERN
34
+
31
35
def_node_matcher :render_view_component_collection? , <<-PATTERN
32
36
(send nil? {:render :render_to_string} (send _ :with_collection ...) ...)
33
37
PATTERN
@@ -41,7 +45,8 @@ def hash_with_literal_keys?(hash)
41
45
end
42
46
43
47
def render_view_component? ( node )
44
- render_view_component_instance? ( node ) ||
48
+ render_view_component_instance_with_content? ( node ) ||
49
+ render_view_component_instance? ( node ) ||
45
50
render_view_component_collection? ( node )
46
51
end
47
52
end
You can’t perform that action at this time.
0 commit comments