in my rails app I\'m creating an array like so:
@messages.each do |message| @list << { :id => message.id, :title => message.title, :ti
Yes, you can use group_by :
http://api.rubyonrails.org/classes/Enumerable.html#method-i-group_by