I have a pretty simple ERB file that loops through a database and spits out data formatted for Bootstrap specific to certain users. Everything looks great, but at the end after all the divs, it includes output that looks like it would if you used the console to filter for items with the same user_id.
I feel like I'm just missing something simple, but I can't find it. Also, the else statement correctly outputs if I destroy all the deals for a given user.
file
<% if @user.deals.any? %>
<%= @deals.each do |deal| %>
<div class="row">
<div class="col col-xs-12">
<%= deal.headline %>
</div>
</div>
<div class="row">
<div class="col col-xs-3">
<%= deal.client %>
</div>
<% if deal.matter? %>
<div class="col-xs-3">
<%= deal.matter %>
</div>
<% end %>
<% if deal.summary? %>
<div class="col-xs-6">
<%= deal.summary %>
</div>
<% end %>
</div>
<% end %>
<% else %>
<div class="row">
<div class="col col-xs-12">
<h4>Add your first deal to see a list here!</h4>
</div>
</div>
<% end %>
additional output after rows of data
[#<Deal id: 18, client: "Headline and client only", matter: "", summary: "", user_id: 2, created_at: "2017-02-08 15:09:28", updated_at: "2017-02-08 15:09:28", headline: "Healine and client only">, #<Deal id: 17, client: "First client", matter: "First matter", summary: "First summary", user_id: 2, created_at: "2017-02-08 15:07:45", updated_at: "2017-02-08 15:07:45", headline: "First headline">]