【发布时间】:2012-04-23 14:00:05
【问题描述】:
我想每三个块插入一个div.row,以便包装三个span一起用于以下haml sn-p。
但是这段代码插入了<div class="row"></div>,而不是包装.span4。
- data.apps.applications.each_with_index do |app, index|
- if index%3 == 0
.row # This is the line I want to insert
.span4
我怎么能在 haml 中做到这一点,或者在这种情况下,erb 更合适?
【问题讨论】:
-
你需要正确的缩进才能工作