単純な HAML ループの実行方法。ERB ビューでは次のようになります。
<table>
<tr>
<th></th>
<th></th>
</tr>
<%= @price. each do |row| %>
<tr>
<td><%= row.year %></td>
</tr>
<% end %>
</table>
例はこれを試しました:
%table
%tbody
%tr
%th year
%th price
エラー:
Inconsistent indentation: 3 spaces were used for indentation