Class: Hash

Inherits:
Object show all
Defined in:
lib/sorenson/services/core_ext/hash.rb

Instance Method Summary collapse

Instance Method Details

#to_param(namespace = nil) ⇒ Object Also known as: to_query



2
3
4
5
6
# File 'lib/sorenson/services/core_ext/hash.rb', line 2

def to_param(namespace = nil)
  collect do |key, value|
    value.to_query(namespace ? "#{namespace}[#{key}]" : key)
  end.sort * '&'
end