Skip to content

Commit 5ade5d4

Browse files
authored
Merge pull request rails#50785 from JunichiIto/add-note-to-params-hash
Add note about `params` hash in Action Controller Overview [ci skip]
2 parents 3769f1e + f172824 commit 5ade5d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

guides/source/action_controller_overview.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ class ClientsController < ApplicationController
110110
end
111111
```
112112

113+
NOTE: The `params` hash is not a plain old Ruby Hash; instead, it is an [`ActionController::Parameters`][] object. While it behaves like Hash, it does not inherit from Hash.
114+
113115
[`params`]: https://api.rubyonrails.org/classes/ActionController/StrongParameters.html#method-i-params
116+
[`ActionController::Parameters`]: https://api.rubyonrails.org/classes/ActionController/Parameters.html
114117

115118
### Hash and Array Parameters
116119

0 commit comments

Comments
 (0)