modify event_type function
This commit is contained in:
parent
b36d02ceec
commit
4fbb7db16b
1 changed files with 1 additions and 11 deletions
|
|
@ -158,17 +158,7 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def event_types(conference)
|
def event_types(conference)
|
||||||
all = conference.program.event_types.map { |et| et.title.pluralize }
|
conference.program.event_types.map { |et| et.title.pluralize }.to_sentence
|
||||||
first = all[0...-1]
|
|
||||||
last = all[-1]
|
|
||||||
ets = ''
|
|
||||||
if all.length > 1
|
|
||||||
ets << first.join(', ')
|
|
||||||
ets << " and #{last}"
|
|
||||||
else
|
|
||||||
ets = all.join
|
|
||||||
end
|
|
||||||
ets
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def sign_in_path
|
def sign_in_path
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue