I want my page to render some Javascript, conditional on a variable from the Rails environment. I must have everything in this one file, because of other build tooling constraints.
Eseentially I am trying to get this working:
= javascript:
console.log('My javascript goes in this area....');
<% if myCondition %>
console.log('Render the JS in here is myCondition is true')
<%end>
However, when I try this, I get errors that <
is not a valid character.