Fix function broken by rubocop autocorrections

This commit is contained in:
James Mason 2018-04-04 10:20:38 -07:00
parent 84dbb52d11
commit 22b92ee748
No known key found for this signature in database
GPG key ID: 1B3951886C449023

View file

@ -62,17 +62,7 @@ module ApplicationHelper
end end
def difficulty_levels(conference) def difficulty_levels(conference)
all = conference.program.difficulty_levels.map(&:title) conference.program.difficulty_levels.map(&:title).to_sentence
first = all[0...-1]
last = all[-1]
ts = ''
if all.length > 1
ts << first.join(', ')
ts << " and #{last}"
else
ts = all.join
end
ts
end end
def unread_notifications(user) def unread_notifications(user)