Class: Hash
Overview
backported from rails
Instance Method Summary collapse
Instance Method Details
#to_query(namespace = nil) ⇒ Object
3 4 5 6 7 |
# File 'lib/core/ext.rb', line 3 def to_query(namespace = nil) collect do |key, value| value.to_query(namespace ? "#{namespace}[#{key}]" : key) end.sort * '&' end |