Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@output_buffer.append=(method_call <<~GRAPHQL, variables
query {
field
}
GRAPHQL
);
@output_buffer.safe_append='
'.freeze;@output_buffer
13 changes: 13 additions & 0 deletions test/template/handlers/herb_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,19 @@ def @view_context.ui_badge(count, **_options)
assert_compiled_snapshot(template)
end

test "heredoc with trailing arguments compiles to valid Ruby" do
template = <<~ERB
<%= method_call <<~GRAPHQL, variables
query {
field
}
GRAPHQL
%>
ERB

assert_compiled_snapshot(template)
end

test "renders templates that are not local with ActionView's ERB handler" do
ReActionView.config.intercept_erb = true

Expand Down
Loading