diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 08710ed..75d08ac 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -13,4 +13,12 @@ module EventsHelper end end.join(', ').html_safe end + + def participant_names_or_emails(event) + event.participants.map do |participant| + participant.try(:personal_profile, current_conference).try(:name) || + participant.personal_profiles.last.try(:name) || + participant.email + end + end end