Module: VaultedBilling::CoreExt::Hash

Defined in:
lib/vaulted_billing/core_ext/hash.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#to_querystringObject



6
7
8
9
10
# File 'lib/vaulted_billing/core_ext/hash.rb', line 6

def to_querystring
  to_a.reject { |pair| pair.last.nil? }.
    sort_by { |item| item.first.to_s }.
    collect { |key, value| "#{key}=#{value}" }.join('&')
end