Rails知道保持乾爽。Rails有沒有其他的方法來做這個循環? DRY
我要創建這樣一個表:http://www.duoh.com/csstutorials/tablesv2/
有沒有這樣做重複循環的任何其他方式?
<tbody>
<tr>
<th class="column1" scope="row">Data usage</th>
<%= @something.each do |info| %>
<td><%= info.name %></td>
<% end %>
</tr>
<tr class="odd">
<th class="column1" scope="row">Opslag Capaciteit</th>
<%= @something.each do |info| %>
<td><%= info.price %></td>
<% end %>
</tr>
</tbody>