I want to add three variables into the same table cell and separate them by a / so the BR/BA column will have an entry like this: 2/2/0, below is my feeble attempt which ofcourse is returning syntax errors, how do I do it? thanks, Adam
<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 %>
[property.bedrooms,property.bathrooms,property.half_bathrooms].join("/")assuming each attribute/method returns a string.