I have a Group model which has_many Topics. The Topics model has_many Posts.
I want to create an array of all Topics for a Group sorted by the Post attribute :published_on.
On my Group show page I have @group.topics.collect {|x| x.posts } which returns an ActiveRecord::Associations::CollectionProxy array with each element containing an array of post objects.
[
[[topic1 post],[topic1 post],[topic1 post]],
[[topic2 post],[topic2 post],[topic2 post]],
[[topic3 post],[topic3 post],[topic3 post]],
]
How do I create a single array of posts sorted by :published_on ?