Hey guys. I want to create a overview page for my application that
contains the latest activity on the site, from a few different
sources. Lets say we have messages, comments, files and tasks (much
like Basecamp, if you’ve ever used it) and you want to display them
all in one big list, intermixed, and sorted by date.
I know I could run queries on all the separate models and then combine
the results, but because this will be paginated, I would end up
getting more records than I really need, and having to trash some,
that seems wasteful and and potentially a hit to performance. So, I’d
really like to be able to put a LIMIT on the DB query itself, as well,
What do you think is the best way to go about this? Thanks a lot guys!