Skip to content

Instantly share code, notes, and snippets.

View deyvin's full-sized avatar
🏠
Working from home

Deyvid Nascimento deyvin

🏠
Working from home
View GitHub Profile
@deyvin
deyvin / hash_to_url_query.rb
Created March 10, 2011 19:20
How to Convert Hash to Url Query
require "addressable/uri"
class Hash
def to_url_params
uri = Addressable::URI.new
keys.size.times do |i|
self[keys[i]] = "#{values[i].to_s}"
end