sha*_*jin 4 haml ruby-on-rails image view
=image_tag('/images/public_stream_page/overlay_image.png',
:onload=>"document.getElementById('dd_mid_right_box_public').style.background='url(#{stream.asset.url(:normal)})';")
Run Code Online (Sandbox Code Playgroud)
这是我的haml代码来显示图像
所以我得到了这个错误
The line was indented 2 levels deeper than the previous line.
Run Code Online (Sandbox Code Playgroud)
怎么解决?
可能不是OP问题的直接答案,但我遇到了这个错误,因为我的HAML的前几行只缩进了一个空格,然后它遇到了使用两个空格缩进的文档部分.显然,HAML处理器使用前几行来计算缩进中有多少个空格,然后它在整个过程中强制执行.
| 归档时间: |
|
| 查看次数: |
4416 次 |
| 最近记录: |