I have an array..
[1,2,3,4]
and I want a string containing all the elements separated by a newline..
1 2 3 4
Just in case anyone searching for this functionality in ERB template then try this :
(1..5).to_a.join("").html_safe