method
to_query
v3.0.0 -
Show latest stable
- Class:
Array
to_query(key)public
Converts an array into a string suitable for use as a URL query string, using the given key as the param name.
['Rails', 'coding'].to_query('hobbies') # => "hobbies[]=Rails&hobbies[]=coding"