[docs] Add note about params hash

Newbies tends to misunderstand params hash is a plain old Hash. So I
added a note that params hash is ActionController::Parameters.
This commit is contained in:
Junichi Ito 2024-01-18 10:13:10 +09:00
parent 8f386d7321
commit f172824d77

@ -110,7 +110,10 @@ class ClientsController < ApplicationController
end
```
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.
[`params`]: https://api.rubyonrails.org/classes/ActionController/StrongParameters.html#method-i-params
[`ActionController::Parameters`]: https://api.rubyonrails.org/classes/ActionController/Parameters.html
### Hash and Array Parameters