Class: Hash

Inherits:
Object show all
Defined in:
lib/support/object.rb

Instance Method Summary collapse

Instance Method Details

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



22
23
24
25
26
# File 'lib/support/object.rb', line 22

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