From 22b92ee748ed86a0bd1f842d652f0f92fa16eff4 Mon Sep 17 00:00:00 2001 From: James Mason Date: Wed, 4 Apr 2018 10:20:38 -0700 Subject: [PATCH] Fix function broken by rubocop autocorrections --- 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 8c461d8f..557ec5ea 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -62,17 +62,7 @@ module ApplicationHelper end def difficulty_levels(conference) - all = conference.program.difficulty_levels.map(&:title) - first = all[0...-1] - last = all[-1] - ts = '' - if all.length > 1 - ts << first.join(', ') - ts << " and #{last}" - else - ts = all.join - end - ts + conference.program.difficulty_levels.map(&:title).to_sentence end def unread_notifications(user)