Skip to content

Instantly share code, notes, and snippets.

@gotva
Created March 21, 2012 12:36
Show Gist options
  • Save gotva/2146630 to your computer and use it in GitHub Desktop.
Save gotva/2146630 to your computer and use it in GitHub Desktop.
def canonical_string params
result = ActiveSupport::OrderedHash.new
params.keys.sort.each do |key, value|
result[key] = value
end
Rack::Utils.build_query(result)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment