mirror of
https://github.com/mastodon/documentation
synced 2025-04-11 22:56:17 +02:00
Changes on ruby arrays as parameters (#226)
This commit is contained in:
parent
3ad0c4ab19
commit
87550bdc7c
@ -74,8 +74,7 @@ ___
|
||||
### Parameter types
|
||||
|
||||
When an array parameter is mentioned, the Rails convention of specifying array parameters in query strings is meant.
|
||||
For example, a ruby array like `foo = [1, 2, 3]` can be encoded in the params as `foo[]=1&foo[]=2&foo[]=3`.
|
||||
Square brackets can be indexed but can also be empty.
|
||||
For example, a ruby array like `foo = [1, 2, 3]` should be encoded in the params as `foo[]=1&foo[]=2&foo[]=3`, with empty square brackets.
|
||||
|
||||
When a file parameter is mentioned, a form-encoded upload is expected.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user