I am trying to implement a simple inbox system for users of my application to send basic messages to each other - as in many forums.
If User has_many :messages , how can I track and notify the user of unread messages since they were last read?
I think that clicks on a link to the Messages screen should be recorded in a separate table ( MessagesClicks ).
Is this the best approach here?
So, I check the MessagesClicks table to see if there are any new messages since the last click of this link - based on the last_clicked or updated_at field .
source share