title: Rails/SQl query help: Find all by created_at in past 7 days per each day?
body: <p>I'm unable to get SQL and Rails to play properly when trying to find Categories that are created each day, the past 7 days.</p>
  
  <p>So basically I want to find each Category sorted by the day they were created for the past 7 days.</p>
  
  <p>I found this on stackoverflow, but it isn't finding a Category that I just created:</p>
  
  <pre><code>Category.all(:conditions =&gt; ["created_at &gt; ? AND created_at &lt; ?", t.at_beginning_of_day, t.tomorrow.at_beginning_of_day])
  </code></pre>
  
  <p>Any help?</p>