title: query where date = Date.today with Rails, MySQL, and Active Record
body: <p>I see in the Active Record docs, you can query for a date using a greater than / less than comparison. However, what if you want to select where date = Date.today or must I query where date is greater than yesterday and less than tomorrow? </p>
  
  <p>As you can see, I'm doing exactly that in the following queries and querying where Date = today returns an empty set</p>
  
  <pre><code>1.9.3p286 :096 &gt; Subscription.where("created_at = ?", Date.today).count
     (0.5ms)  SELECT COUNT(*) FROM `subscriptions` WHERE (created_at = '2013-01-18')
   =&gt; 0 
  </code></pre>
  
  <p>vs. </p>
  
  <pre><code>1.9.3p286 :098 &gt; Subscription.where("expiration_date &lt; ? AND expiration_date &gt; ?", Date.today + 1, Date.today - 1).count
     (0.4ms)  SELECT COUNT(*) FROM `subscriptions` WHERE (expiration_date &lt; '2013-01-19' AND expiration_date &gt; '2013-01-17')
   =&gt; 1 
  </code></pre>
  
  <p>Is this the proper way to query for today's date or am I missing something?</p>