title: Grouping by Days Created_At
body: <p>I am trying to get a loop to post videos grouped by each day by created_at.</p>
  
  <p>For example:</p>
  
  <p>December 5, 2012 -
  Video 9
  Video 8
  Video 7</p>
  
  <p>December 4, 2012 -
  Video 6
  Video 5</p>
  
  <p>December 3, 2012 -
  Video 4
  Video 3
  Video 2
  Video 1</p>
  
  <p><strong>videos_controller:</strong></p>
  
  <pre><code>  def index
      @title = 'Hip Hop Videos, Breaking News, Videos, And Funny Shxt | HOTDROPHIPHOP'
      @description = ''
      @videos = Video.all
      @days = Video.where(:created_at == Time.today )
    end
  </code></pre>
  
  <p><strong>View file:</strong></p>
  
  <pre><code>&lt;% @days.each do |day| %&gt;
  
    &lt;div class="video-date"&gt;December 4, 2012&lt;/div&gt;
  
    &lt;% @videos.each do |video| %&gt;
    &lt;% end %&gt;
  
  &lt;% end %&gt;
  </code></pre>
  
  <p>I also need to get that div to show that day's date as well.</p>
  
  <p>I searched around and couldn't find a solution and tried the group_by (which seemed the cleanest) but couldn't get it to work. I am a bit rusty on my Rails as I haven't touched it for months.</p>