我想将三个变量添加到同一个表格单元格中,并用 / 分隔它们,因此 BR/BA 列将有一个这样的条目:2/2/0,下面是我的微弱尝试,它当然会返回语法错误,怎么办我做吗?谢谢,亚当
<table class="listing" summary="Property list">
<tr class="header">
<th>Property Address</th>
<th>Price</th>
<th>Sq Ft</th>
<th>BR/BA</th>
<th>Type</th>
</tr>
<% @properties.each do |property| %>
<tr>
<td><%= link_to(property.address, {:action => 'show', :id => property.id}) %></td>
<td class="center"><%= property.price %></td>
<td class="center"><%= property.sq_ft %></td>
<td class="center"><%= {property.bedrooms "/" property.bathrooms "/" property.half_bathrooms} %></td>
<td class="center"><%= property.property_type %></td>
</tr>
<% end %>