1 2 3 4 5 6 7 8 9 10 11
var x = "<%= x %>"; var y = 5; Second line is treated as if it was a string. Problem with multiple lines inside ruby if: <% if b %> var x = 1; alert(1); <% end %>