This is a follow up to Creating "feeds" from multiple, different Rails models. In this question, tadman suggests this method of creating a user feed of recent item
What I did once was, have a separate model Feed (feeds_controller) and update it in after_save callbacks to all the interesting
models. So for example if you have a model Article, have an after_save callback:
def after_save
feed = Feed.new
feed[:model_name] = 'Article'
feed[:item_id] = id
feed.save
end
then, you can access the feed linearly just like any other model. The computational expense is incurred when saving the the feed, not reading from the feed.
Oh, you can also have Feed has_many :article; has_many :user, has_many :status
and so forth, and then :include
all those resources in the feed, and render them in views. Hope this makes sense ;-)