So I have a model that I want to retrieve records and group them by dates of the created_at field. But created_at is a datetime field, and I am only interested in the date part. So I am looking for something like a 2D array, first layer would a hash with date string as the key, second layer would be arrays with records. How should I do it?
{ "9/28/2012" => [record, record, record], "9/29/2012" => [record, record, record], "9/30/2012" => [record, record, record] }
At top of the above, how should I do it if I want the above arrange be applied to all records retrieved from this model?