Skip to content

Instantly share code, notes, and snippets.

@iltempo
Created November 1, 2009 18:25
Show Gist options
  • Save iltempo/223650 to your computer and use it in GitHub Desktop.
Save iltempo/223650 to your computer and use it in GitHub Desktop.
# Method converting hash of attributes to url string
def to_url_params(params)
params.each do |key, value|
"#{CGI::escape(key.to_s)}=#{CGI::escape(value.to_s)}"
end.join('&')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment