title: how to make a date range with created_at
body: <p>I'm trying to get the total number of Profile views created within the last 30 days in my Rails app. The code below is producing a result of '0' when it's expected to be '1' (i.e. I viewed the profile once). I'm wondering if I did something wrong with the range. Rails is not throwing an error. </p>
  
  <pre><code> @profileviews = Profileview.where({:user_id =&gt; @user.id, :created_at =&gt; (Date.today)..(Date.today - 30)}).count
  </code></pre>
  
  <p>Note, the profileview I'm expecting it to include in the count was created today. </p>
  
  <p><code>created_at: "2013-05-31 14:43:55"</code></p>