I’m trying to build a dashboard type page (similar in function to
basecamp’s) where I can show the last 5 updated items from my 3
differing models, then grouped together by project.
(1) Is it best to create a log model where everytime I add or update
another model (like messages, comments, lists etc) an enrty gets added
to the log along with the project. I can see this being an overkill and
the duplication of data is not correct.
(2) In my controller perform a query that searches every model for every
item against a given project_id. The order the results by “updated_on”.
Then select the last 5 for each result. This seems really complicated
and perfoms many SQL queries
Does rails/ruby have a better way of achieving this? What have you done
in your projects that works reliably and quickly?