From 8a0ae821652eb7a159832df2ff580f410b0f9ba7 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 9 Oct 2016 02:55:31 +0300 Subject: [PATCH] Reintroduce the EventsHelper::participants_names_or_emails method --- app/helpers/events_helper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) 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