I created this method in a helper file:
def participant_names(conversation)
conversation.receipts.reject { |p| p.receiver == current_user }.collect {|p| p.receiver.name }.uniq.join(" ,")
end
What this is doing is, removing the current_user from the conversation object, then creates a new array that contains the names for (in this case users) that conversation object. the '.uniq' method ensures that each users name is only displayed once (in the case there have been many message back and forth conversation). Finally comma separates them.