speakers_names is made in sentense using join
This commit is contained in:
parent
52a5cb2391
commit
6c8ebe586c
1 changed files with 1 additions and 5 deletions
|
|
@ -204,11 +204,7 @@ class Event < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def speaker_names
|
def speaker_names
|
||||||
result = Set.new
|
speakers.map(&:name).join(', ')
|
||||||
speakers.each do |speaker|
|
|
||||||
result.add(speaker.name)
|
|
||||||
end
|
|
||||||
result.to_a.to_sentence
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Returns emails of all the speaker belongs to a particular event
|
# Returns emails of all the speaker belongs to a particular event
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue