Im looking to write an activity log as part of the dashboard for one
of my apps. The log should show messages like
"Vinay created the project Acme Inc Website", "You completed 2 tasks
in the project Acme Inc website"
and so on.
So i went about creating an activities table with controller, action,
user, message and timestamps. Now the messages the user sees in his
dashboard should have links on words like "You", "Vinay", "Acme Inc
Website" and so on such that they link to those respective resources.
I created the "message" column in the Activities table thinking i can
dynamically create the message and store it in DB and extract it for
the dashboard. All that works fine but now how do I insert the links?
whats the best strategy for this? scrap what I have done and please
suggest ideas on how you might approach this problem. one thing I DO
NOT want to do is dynamically generate those messages in the view. I
just think it will be too much load on the db AND rendering action
itself as compared to storing the message and applying the links
dynamically on retrieval somehow.
thoughts? ideas? suggestions?