title: How to sum columns in rails?
body: <pre><code>  &lt;% @cart.items.each do |item| %&gt;
      &lt;div class="holder"&gt;
  
          &lt;div class="image"&gt;&lt;%= link_to (image_tag (item.product.avatar.url(:thumb))), item.product %&gt;&lt;/div&gt;
          &lt;div class="title"&gt;&lt;%= link_to item.product.title, item.product %&gt;&lt;/div&gt;
  
          &lt;div class="count"&gt;&lt;%= item.count %&gt;&lt;/div&gt;
          &lt;div class="price"&gt;&lt;%= number_to_currency(item.product.price, :unit =&gt; '€ ') %&gt;&lt;/div&gt;
          &lt;div class="description"&gt;&lt;%= item.product.description.truncate(110).html_safe %&gt;&lt;/div&gt;
      &lt;/div&gt;
    &lt;% end %&gt;
  
    &lt;div class="total"&gt;Total price: @price&lt;/div&gt;
  </code></pre>
  
  <p>I'd like to get the total sum of <code>item.product.price</code> column for each <code>cart</code> and then display it at the end of the carts list. How can that be done?</p>