Class: Hash
Instance Method Summary collapse
- #to_param(namespace = nil) ⇒ Object (also: #to_query)
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 |