File tree 1 file changed +6
-7
lines changed 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -509,7 +509,7 @@ post 'users/signup' do
509
509
end
510
510
````
511
511
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 ` .
513
513
514
514
** Request**
515
515
@@ -562,7 +562,7 @@ curl -X POST -H "Content-Type: application/json" localhost:9292/users/signup -d
562
562
}
563
563
````
564
564
565
- The returned hash is a ` ActiveSupport::HashWithIndifferentAccess ` hash .
565
+ The returned hash is a ` Hash ` .
566
566
567
567
``` ruby
568
568
declared(params)[:user ] == declared(params)[' user' ]
@@ -905,14 +905,13 @@ params do
905
905
requires :avatar , type: File
906
906
end
907
907
post ' /' do
908
- # Parameter will be wrapped using HashWithIndifferentAccess :
908
+ # Parameter will be a plain Ruby `Hash` :
909
909
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>
912
912
end
913
913
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.
916
915
```
917
916
918
917
### First-Class ` JSON ` Types
You can’t perform that action at this time.
0 commit comments