When you use one line Ruby comments in ERB templates you should never do this (notice the whitespace in front of #
):
<% # my comment %>
<div>my html</div>
This leads to strange html output. To avoid long debugging sessions, you should never have a whitespace before the #
character (but newline is allowed)
<%# this works as expected %>
<%
# this works, too
# foo bar baz
%>
Posted by Ulrich Berkmüller to makandra dev (2011-12-01 14:16)