Displaying 1 result from an estimated 1 matches for "ordddpmgpeij".
2012 Sep 10
3
How to remove last comma when iterating through hash in erb template
I need to produce a line in a config file in the format x = "ip1,ip2,ip3"
I am using the method below to sort the hash before iterating over it.
However, as you can see there will always be a final comma which breaks the
app that uses this config file. Does anyone know how I could remove the
final comma?
ipv4_bind_addresses = "<% routes.sort_by {|key, v| key}.each do |key,