Haml code conversion from Ruby -
i have code mentioned below , trying make work on ror application under haml extension. getting unexpected keyword end. read on net , stackoverflow , found out end not required in haml. when remove error saying end keyword expected. please check , tip me doing wrong? in advance.
<div id="comments"> <% @comments.each |comment| %> <div class ="comment"> <%= simple_format comment.content %> </div> <%end%> </div>
what did far is:
%h1 comments .comments - @comments.each |comment| .comment = simple_format comment.content
any clues? thanks
please note haml based on 2 space indentations. correct haml version of html is
#comments - @comments.each |comment| .comment = simple_format comment.content