title: How to sum object column?
body: <p><p>I need to make sum of column.
  <b><p>I think problem is in class, in action where I take performance_reports.</b>
   I have associsations, so I get all reports related to user by next code:</p>
  
  <pre><code>    @performance_reports = Array.new
       current_user.websites.each do |website|
        reports = website.performance_reports
          reports.each do |report|
          @performance_reports.push(report)
        end
      end
  </code></pre>
  
  <p>In my view I'm printig each report and in the bottom I want to print summary of column.
  <p>Here is view:</p>
  
  <pre><code>   &lt;% @performance_reports.each do |performance_report| %&gt;
        &lt;tr&gt;
          &lt;td&gt;&lt;%= performance_report.impressions %&gt;&lt;/td&gt;
          &lt;td&gt;&lt;%= performance_report.clicks %&gt;&lt;/td&gt;
          &lt;td&gt;&lt;%= performance_report.conversions %&gt;&lt;/td&gt;
        &lt;/tr&gt;
       &lt;% end %&gt;
       &lt;tr&gt;
        &lt;td&gt;&lt;%=  @performance_reports.count(:clicks)%&gt;&lt;/td&gt;
        &lt;td&gt;&lt;%=  @performance_reports.count(:conversions)%&gt;&lt;/td&gt;
       &lt;/tr&gt;
  </code></pre>
  
  <p>All - clicls, conversions - are integer type.
  This code is printing, that summary is 0.
  <p><b>I have two questions: how to sum integers and how to sum not integer columns, which are not saving to database?</b></p>