This feels like a bit of a loaded question, and though I don't have the time to dig into it in full, here are some initial thoughts for you:
you can combine the two types of items you want to display into a single array and then sort this array based on a field which ought to be common between the two (created_at comes to mind) to get them into chronological order.
In the view, you can use this single collection to iterate over and then use helpers and unique partials to render the items in the correct format. This could be done by checking the objects type as you are trying to display it in the view.
Something along the lines of:
if item.is_a? Message
render :partial => 'message', :locals => {:message => item }
elsif item.is_a? Image
render :partial => 'image', :locals => {:image => item }
end
hopefully this helps some!
EDIT: to combine the arrays, you can simply append them together using the '+' operator, since arrays in Ruby do not need to contain a single object type.
your Messages.all and Images.all calls give you arrays of objects, so just try
@messages + @images
and you should have your combined array.
EDIT #2: If I were writing this myself, I would probably handle the views somewhat like this:
at the top level, simply pass your feeds collection to a partial which is designed to render a single item:
render :partial => "item", :collection => @feed
this will render the '_item.html.erb' partial for each item in @feed. Also, it will give the partial a local variable named 'item' each time, which is the item in @feed for that particular iteration.
now, I would probably have the '_item' partial be very simple, like this:
<%= display_item(item) %>
where display_item is a helper method outside the view and is implemented with the "is_a?" type logic from above to choose the correct display format for the item.
the reason I would break it up like this is it takes advantage of some nice rails features (pass a collection to a partial instead of looping over the collection yourself) and then pulling the logic out into helpers (or even the models if it makes sense to) is useful because it simplifies your views. keeping logic out of the view whenever possible is generally a good practice as such logic can be hard to test and your views will become very hard to read.