asm-helpful/helpful-web — pull request #50 by austinylin (2013-11-25 03:51:34+00:00)
Title: WIP 27 Add Read Receipts

Per: https://assemblymade.com/helpful/wips/27

This PR adds the ReadReceipt model which is a join table between person and message. The read receipt time is defined as the created_at time of the ReadReceipt object.

This PR also adds a convenience method #mark_read to message which allows a message to easily be marked as read. Without any arguments this method marks the message read for the associated person, alternatively a person object can be passed to create the ReadReceipt on that person.