}.join("=") }.join("&")
Ignore my stupidity above; this is shorter and less redundant:
“?” << map{ |kv| kv.map{ |e| CGI.escape(e) }.join("=") }.join("&")
Paul.
golfing?
“?#{map{|k, v| “#{CGI.escape k}=#{CGI.escape v}”} * ‘&’}”
cheers
Simon
}.join("=") }.join("&")
Ignore my stupidity above; this is shorter and less redundant:
“?” << map{ |kv| kv.map{ |e| CGI.escape(e) }.join("=") }.join("&")
Paul.
golfing?
“?#{map{|k, v| “#{CGI.escape k}=#{CGI.escape v}”} * ‘&’}”
cheers
Simon
On 15/03/06, Kroeger, Simon (ext) [email protected] wrote:
golfing?
“?#{map{|k, v| “#{CGI.escape k}=#{CGI.escape v}”} * ‘&’}”
All right then!
“?”<<map{|h|h.map{|e|CGI.escape(e)}‘=’}‘&’
Paul.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs