How do I escape the ERB tag in ERB

Add a second % to the opening tag:

label:
    body: "<%%= variable %>"

The <%% sequence is valid ERB, rendered as a literal <%.

Leave a Comment