I have the following block:
<% @place.each do |f| %>
<%= f.name %><br>
<%= f.type %>
<% end %>
which prints horizontally using display: inline-block
. How can I add a seperator or delimiter in between each pair, but not after the last one?
It should look something like this:
printout - printout - printout - printout
A common approach, without a counter:
<% @place.each do |f| %>
<%= f.name %><br>
<%= f.type %>
<% if f != @place.last %>
<div class="delimiter">-</div>
<% end %>
<% end %>