我正在使用SLIM,但不确定如何修复缩进。我看到此错误:
/ users / user语法错误处的SyntaxError,意外的keyword_else,期望keyword_end; 别的; ^ /views/users/shared/_user_item.html.slim:18:语法错误,意外的keyword_ensure,期望输入结束
来自此文件:
li
.common_box.box3
.img_box
= link_to user do
- if user.avatar.present?
img alt="" src="#{user.avatar.try(:image_url, :similar)}" style=("width: 194px;height: 139px;") /
- else
img alt="no image" src="" style=("width: 194px;height: 139px;") /
.img_detail
small years
.circle
span.age_box = user.age
h3 #{user.username} #{current_user.location.state}
h4 #{user.location.city}, #{user.location.state}
.green_corner
img alt="" src="/assets/side_curv.png" /
尝试在上进行此操作(未缩进您的图片标签)line 6
。
li
.common_box.box3
.img_box
= link_to user do
- if user.avatar.present?
img alt="" src="#{user.avatar.try(:image_url, :similar)}" style=("width: 194px;height: 139px;") /
- else
img alt="no image" src="" style=("width: 194px;height: 139px;") /
.img_detail
small years
.circle
span.age_box = user.age
h3 #{user.username} #{current_user.location.state}
h4 #{user.location.city}, #{user.location.state}
.green_corner
img alt="" src="/assets/side_curv.png" /
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句