views:

163

answers:

1

Hi,

I have a simple fixture.yml

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

The issue is that the erb code is parsed as part of loading the fixture, but I actually want to body to be "<%= variable %>" un-interpolated.

How do I escape this?

-daniel

+5  A: 

Add a second % to the opening tag:

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

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

molf
ah ha! I was doubling both of them! TY
Daniel