title: Count of records that are created the same day
body: <p>I am trying to create a array that should be something like this:</p>
  
  <pre><code>[ [created_at date * 1000, count record for that date],
    [created_at date * 1000, count record for that date], 
    [created_at date * 1000, count record for that date] ]
  </code></pre>
  
  <p>The created_at date is not exactly the same, because of minutes, hours and seconds. 
  I was thinking is it possible to change created_at time on create to <code>00:00:00</code></p>
  
  <p>I have tried with this, </p>
  
  <pre><code>@kliks = Klik.all.map{|klik| [(klik.created_at.to_i * 1000), 1]}
  </code></pre>
  
  <p>But I have not figure out to sum those records that are created the same day. Also this loops create a array for every single record, I don't want duplicates of the sum. </p>