foo_hash.each_pair.map{ |x,y|
    "#{x}=#{CGI.escape(y)}"
  }.join("&")
URI::encodeみたいなのはRuby1.9からは推奨されていない
下記3つも使える
- CGI.escape
 - URI.www_form_encode
 - URI.www_form_encode_component
 
Go to list of users who liked
Share on X(Twitter)
Share on Facebook
More than 5 years have passed since last update.
  foo_hash.each_pair.map{ |x,y|
    "#{x}=#{CGI.escape(y)}"
  }.join("&")
URI::encodeみたいなのはRuby1.9からは推奨されていない
下記3つも使える
Register as a new user and use Qiita more conveniently
Go to list of users who liked