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 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -