Skip to content

Instantly share code, notes, and snippets.

@dmgarland
Created March 10, 2014 10:57
Show Gist options
  • Select an option

  • Save dmgarland/9463005 to your computer and use it in GitHub Desktop.

Select an option

Save dmgarland/9463005 to your computer and use it in GitHub Desktop.
Marshal the whole key?
url = "http://prod.hi360.com"
params = {:channel_id=>"12345", :lang=>"en"}
key = Marshal.dump(url + "?" + params.to_a.map {|a| a.join("=")}.join('&'))
url = Marshal.load(key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment