Skip to content

Commit 8c91e22

Browse files
authored
Update render_literal_helpers.rb
1 parent 11d5766 commit 8c91e22

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/rubocop/cop/github/render_literal_helpers.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ module RenderLiteralHelpers
2929
PATTERN
3030

3131
def_node_matcher :render_view_component_instance_with_content?, <<-PATTERN
32-
(send nil? {:render :render_to_string} (block (send (send _ :new ...) `:with_content ...) ...))
32+
(send nil? {:render :render_to_string} (send (send _ :new ...) `:with_content ...))
33+
PATTERN
34+
35+
def_node_matcher :render_view_component_instance_with_inline_block?, <<-PATTERN
36+
(send nil? {:render :render_to_string} (block (send (send _ :new ...) ...) ...))
3337
PATTERN
3438

3539
def_node_matcher :render_view_component_collection?, <<-PATTERN
@@ -47,6 +51,7 @@ def hash_with_literal_keys?(hash)
4751

4852
def render_view_component?(node)
4953
render_view_component_instance_with_content?(node) ||
54+
render_view_component_instance_with_inline_block?(node) ||
5055
render_view_component_instance?(node) ||
5156
render_view_component_collection?(node)
5257
end

0 commit comments

Comments
 (0)