On Sep 1, 2014 3:35 AM, "Juan Sierra Pons" <ju...@elsotanillo.net> wrote:
>
> Hi
>
> Finally I have changed to another kind on loop that works for my case
>
> uri<% @ldap_servers.each do |server| -%>
> ldap://<%= server -%>
> <% end %>
As you've found, an explicit loop, er, iterable is better than trying to use implicit conversion of an array to a string.
An alternative is to use the 'join' method; that will put the separator only between the elements, rather than having to have it before or after each. This would be clearly better with a comma or other non-whitespace separator.
Wil