sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

Hash#to_param

Returns a string representation of the receiver suitable for use as a URL
query string:

  {name: 'David', nationality: 'Danish'}.to_param
  # => "name=David&nationality=Danish"

An optional namespace can be passed to enclose the param names:

  {name: 'David', nationality: 'Danish'}.to_param('user')
  # => "user[name]=David&user[nationality]=Danish"

The string pairs "key=value" that conform the query string
are sorted lexicographically in ascending order.

This method is also aliased as +to_query+.

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/object/to_query.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Hash-to_param-for-pr


# Commit to git

git add app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/object/to_query.rbgit commit -m "better docs for Hash#to_param"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Hash-to_param-for-pr

hub pull-request


# Celebrate!