Using rails 2.3.2 I have a partial _foo.rhtml that begins with a comment
<% # here is a comment %> <li><%= foo %></li>
When I render the partial from a view in the traditional way, e.g.
<% some_numbers = [1, 2, 3, 4, 5] %> <ul> <%= render :partial => "foo", :collection => some_numbers %> </ul>
I found that the
solve this problem by fixing _foo.rhtml to eliminate the space between
<% and # so that it reads:
<%# here is a comment %> <li><%= foo %></li>
My question: what’s going on here? E.g., is <% # comment %> simply
incorrect syntax for including comments in a template? Or is the
problem more subtle?