Combining two different ActiveRecord collections into one

Viewed 6129

I want create a visual timeline of all company events. The HTML for the timeline is built using a loop.

For simplicity let's assume two models Hire & Deal. Both models have a date attribute and some model specific attributes. How do I merge the ActiveRecord results of both models, and then order the combined hash by date, into a single hash that I can loop through?

1 Answers
Related