I have this code mentioned below and I am trying to make it work on a RoR application under haml extension. However I am getting unexpected keyword end. I read over the net and stackoverflow and found out that end is not required in HAML. However when I remove it I get an error saying that end keyword is expected. Could you please check and tip me what I am doing wrong? Thanks in advance.
<div id="comments">
<% @comments.each do |comment| %>
<div class ="comment">
<%= simple_format comment.content %>
</div>
<%end%>
</div>
What I did so far is:
%h1 Comments
.comments
- @comments.each do |comment|
.comment
= simple_format comment.content
Any clues? Thanks