Sha256: 42f8f5b7ebfdb104a9297c072768a6dfa7c63711730404ab9000cf5ef6ec8434

Contents?: true

Size: 201 Bytes

Versions: 23

Compression:

Stored size: 201 Bytes

Contents

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

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
360_services-0.0.3 lib/sorenson/services/core_ext/hash.rb
360_services-0.0.2 lib/sorenson/services/core_ext/hash.rb
360_services-0.0.1 lib/sorenson/services/core_ext/hash.rb