Reintroduce the EventsHelper::participants_names_or_emails method

This commit is contained in:
Petko Bordjukov 2016-10-09 02:55:31 +03:00
parent c44654f79f
commit 8a0ae82165
1 changed files with 8 additions and 0 deletions

View File

@ -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