Skip to content

Commit 7e255f3

Browse files
author
James McCarthy
committed
Change README.md to reference Hash not HashWithIndifferentAccess
1 parent e713257 commit 7e255f3

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ post 'users/signup' do
509509
end
510510
````
511511

512-
If we do not specify any params, `declared` will return an empty `ActiveSupport::HashWithIndifferentAccess` hash.
512+
If we do not specify any params, `declared` will return an empty `Hash`.
513513

514514
**Request**
515515

@@ -562,7 +562,7 @@ curl -X POST -H "Content-Type: application/json" localhost:9292/users/signup -d
562562
}
563563
````
564564

565-
The returned hash is a `ActiveSupport::HashWithIndifferentAccess` hash.
565+
The returned hash is a `Hash`.
566566

567567
```ruby
568568
declared(params)[:user] == declared(params)['user']
@@ -905,14 +905,13 @@ params do
905905
requires :avatar, type: File
906906
end
907907
post '/' do
908-
# Parameter will be wrapped using HashWithIndifferentAccess:
908+
# Parameter will be a plain Ruby `Hash`:
909909
params[:avatar][:filename] # => 'avatar.png'
910-
params['avatar']['avatar'] # => 'image/png'
911-
params[:avatar][:tempfile] # => #<File>
910+
params[:avatar]['avatar'] # => 'image/png'
911+
params[:avatar][:tempfile] # => #<File>
912912
end
913913

914-
`params` hash keys can accesed with `""` or `:`
915-
`:avatar` and `"avatar"` are considered to be the same.
914+
`params` hash keys will all be converted to symbols.
916915
```
917916

918917
### First-Class `JSON` Types

0 commit comments

Comments
 (0)