This is another good place to cut out duplicated code:
```Ruby
participation_class = user == 'member' ? MemberParticipation : MentorParticipation
project_ids = participation_class.where(user_uuid: nil).map(&:project_id)
```