From: marcus Date: 2005-11-09T03:41:28+09:00 Subject: Better way to build string I'm trying to build a query string based on an array of properties. Is there a shorter/nicer way to do the following? def build_query_string(properties, prop_type) result = "" properties.each do |item| if prop_type == "tag" result += " #{item.name}=#{item.value}" else if result == "" result = "?" else result += "&" end result += "#{item.name}=#{item.value}" end end result end /Marcus