I'm on Ruby 1.9.2, Rails 3.0.x and I use MySQL DB. I have a Messages Model, where one can post new messages every day. I have an index action where I want to display these messages grouped by both month and year. This basically is used to filter messages. My query looks like this:- @active_msgs = Messages.where('expiry > ?', Time.now).order('created_at DESC') I used the group_by function in Rails,
