title: Rails 3 DateTime Comparison w/ Date In An ActiveRecord Query
body: <p>I'm trying to search a model for any dates equal to a specific date while omitting the timestamp. In Rails I could simply execute this as <code>DateTime.to_date == somedate</code>, however I don't think it's quite as easy to formulate in SQL where I wouldn't be able to apply the to_date method to an entire column like created_at:</p>
  
  <pre><code>Foo.where("created_at == some_day_without_time_stamp").count
  </code></pre>
  
  <p>Initially I thought that because I was using a postgresql database I could simply use psql syntax, but I much much rather leave it to ActiveRecord to decide what sql is most applicable and keep my code agnostic of database vendors. Is this possible without any additional plugins or gems?</p>