Skip to content

Instantly share code, notes, and snippets.

@pasberth
Created July 27, 2011 23:10
Show Gist options
  • Save pasberth/1110564 to your computer and use it in GitHub Desktop.
Save pasberth/1110564 to your computer and use it in GitHub Desktop.
ハッシュをgetのパラメタにする
# h = { "key0"=>"value0", "key1"=>"value1", "key2"=>"value2" }
h.map { |k, v| "#{k}=#{v}" }.join('&')
# => "key0=value0&key1=value1&key2=value2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment