From 4fbb7db16b42d5d6028aa061f9d7c4ed2b5c083c Mon Sep 17 00:00:00 2001 From: hitman Date: Fri, 17 Mar 2017 18:52:10 +0530 Subject: [PATCH] modify event_type function --- app/helpers/application_helper.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e3b1a692..b3081f9b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -158,17 +158,7 @@ module ApplicationHelper end def event_types(conference) - all = conference.program.event_types.map { |et| et.title.pluralize } - first = all[0...-1] - last = all[-1] - ets = '' - if all.length > 1 - ets << first.join(', ') - ets << " and #{last}" - else - ets = all.join - end - ets + conference.program.event_types.map { |et| et.title.pluralize }.to_sentence end def sign_in_path