ruby on rails - The line was indented 2 levels deeper than the previous line. HAML -


 =image_tag('/images/public_stream_page/overlay_image.png', :onload=>"document.getelementbyid('dd_mid_right_box_public').style.background='url(#{stream.asset.url(:normal)})';") 

this haml code display image
getting error

the line indented 2 levels deeper previous line. 

how resolve it?

you're not displaying code in correct way problem relates space indentation... line numbers help. should have this:

- if stream.asset?    =image_tag('/images/public_stream_page/overlay_image.png',:onload=>"document.getelementbyid('dd_mid_right_box_public').style.background='url(#{stream.asset.url(:normal)})';")  

with second line indented same number of spacing use in rest of templeate, while perhaps have 1 line (number in error not shown) 2 times more indented.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -