Replacing a loop with join(' ') in erb - fixed