What is the most elegant way in Rails to create a comma-separated list inside a partial?
I\'ve just recently discovered that you can use partials to iterate through
Ruby's join method won't add the separator character if there is only a single element in the array.
join
You should be able to do the following for a list of any size:
@dvd.director.map(&:director).join(", ")