我想插入一個div.row
每三個塊爲了換行三個span
在一起爲下面的haml片段。如何用haml每隔幾格插入一個塊?
但是,此代碼插入一個<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
erb
我怎麼能做到這一點在中引入haml或者在這種情況下,更適合?
它不工作?如果是這樣,怎麼樣? – 2012-04-23 14:03:27
你需要正確的縮進才能正常工作 – 2012-04-23 14:58:32