Question about has_many-through Inbox x

The question is kind of long and probably simple...I posted on StackOverflow at the link below. Thank you in advance for anyone taking the time to look.

The question is kind of long and probably simple...I posted on StackOverflow at the link below. Thank you in advance for anyone taking the time to look.